diff --git a/core/range/cover_spec.rb b/core/range/cover_spec.rb index fa881607e9..eb7cddc967 100644 --- a/core/range/cover_spec.rb +++ b/core/range/cover_spec.rb @@ -7,4 +7,8 @@ it_behaves_like :range_cover_and_include, :cover? it_behaves_like :range_cover, :cover? it_behaves_like :range_cover_subrange, :cover? + + it "covers U+9995 in the range U+0999..U+9999" do + ("\u{999}".."\u{9999}").cover?("\u{9995}").should be_true + end end diff --git a/core/range/include_spec.rb b/core/range/include_spec.rb index b2c7a54545..277de205d1 100644 --- a/core/range/include_spec.rb +++ b/core/range/include_spec.rb @@ -7,4 +7,8 @@ describe "Range#include?" do it_behaves_like :range_cover_and_include, :include? it_behaves_like :range_include, :include? + + it "does not include U+9995 in the range U+0999..U+9999" do + ("\u{999}".."\u{9999}").include?("\u{9995}").should be_false + end end diff --git a/core/range/shared/cover_and_include.rb b/core/range/shared/cover_and_include.rb index 7028afaa89..f36a2cef8b 100644 --- a/core/range/shared/cover_and_include.rb +++ b/core/range/shared/cover_and_include.rb @@ -57,7 +57,6 @@ it "returns true if argument is less than the last value of the range and greater than the first value" do (20..30).send(@method, 28).should be_true ('e'..'h').send(@method, 'g').should be_true - ("\u{999}".."\u{9999}").send @method, "\u{9995}" end it "returns true if argument is sole element in the range" do