summaryrefslogtreecommitdiff
path: root/spec/ruby/core/range/to_s_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/range/to_s_spec.rb')
-rw-r--r--spec/ruby/core/range/to_s_spec.rb16
1 files changed, 7 insertions, 9 deletions
diff --git a/spec/ruby/core/range/to_s_spec.rb b/spec/ruby/core/range/to_s_spec.rb
index b59849fc57..460c330912 100644
--- a/spec/ruby/core/range/to_s_spec.rb
+++ b/spec/ruby/core/range/to_s_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "Range#to_s" do
it "provides a printable form of self" do
@@ -11,15 +11,13 @@ describe "Range#to_s" do
(0.5..2.4).to_s.should == "0.5..2.4"
end
- it "returns a tainted string if either end is tainted" do
- (("a".taint)..."c").to_s.tainted?.should be_true
- ("a"...("c".taint)).to_s.tainted?.should be_true
- ("a"..."c").taint.to_s.tainted?.should be_true
+ it "can show endless ranges" do
+ eval("(1..)").to_s.should == "1.."
+ eval("(1.0...)").to_s.should == "1.0..."
end
- it "returns a untrusted string if either end is untrusted" do
- (("a".untrust)..."c").to_s.untrusted?.should be_true
- ("a"...("c".untrust)).to_s.untrusted?.should be_true
- ("a"..."c").untrust.to_s.untrusted?.should be_true
+ it "can show beginless ranges" do
+ (..1).to_s.should == "..1"
+ (...1.0).to_s.should == "...1.0"
end
end