diff options
author | Benoit Daloze <eregontp@gmail.com> | 2020-01-28 20:47:48 +0100 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2020-01-28 20:47:48 +0100 |
commit | 809f0b8a1357f14f9645210d4812f4400c8d397e (patch) | |
tree | 7ce6192f94b1dc4b004798aa5d0c4d6bac02577f /spec/ruby/core/range/to_s_spec.rb | |
parent | ed377cc9aaf1ccbede19ddc6c464f5fbf3cabc34 (diff) |
Update to ruby/spec@f8a2d54
Diffstat (limited to 'spec/ruby/core/range/to_s_spec.rb')
-rw-r--r-- | spec/ruby/core/range/to_s_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/ruby/core/range/to_s_spec.rb b/spec/ruby/core/range/to_s_spec.rb index 7392aa9890..ccbc5d8e7e 100644 --- a/spec/ruby/core/range/to_s_spec.rb +++ b/spec/ruby/core/range/to_s_spec.rb @@ -11,6 +11,13 @@ describe "Range#to_s" do (0.5..2.4).to_s.should == "0.5..2.4" end + ruby_version_is "2.6" do + it "can show endless ranges" do + eval("(1..)").to_s.should == "1.." + eval("(1.0...)").to_s.should == "1.0..." + end + end + ruby_version_is ''...'2.7' do it "returns a tainted string if either end is tainted" do (("a".taint)..."c").to_s.tainted?.should be_true |