diff options
Diffstat (limited to 'spec/ruby/core/range/dup_spec.rb')
-rw-r--r-- | spec/ruby/core/range/dup_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/ruby/core/range/dup_spec.rb b/spec/ruby/core/range/dup_spec.rb new file mode 100644 index 0000000000..cdb792c97f --- /dev/null +++ b/spec/ruby/core/range/dup_spec.rb @@ -0,0 +1,15 @@ +require File.expand_path('../../../spec_helper', __FILE__) + +describe "Range#dup" do + it "duplicates the range" do + copy = (1..3).dup + copy.begin.should == 1 + copy.end.should == 3 + copy.exclude_end?.should == false + + copy = ("a"..."z").dup + copy.begin.should == "a" + copy.end.should == "z" + copy.exclude_end?.should == true + end +end |