Skip to content

Commit 1cc9c7b

Browse files
committed
Improve Range#dup spec
1 parent f28def3 commit 1cc9c7b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spec/ruby/core/range/dup_spec.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
describe "Range#dup" do
44
it "duplicates the range" do
5-
copy = (1..3).dup
5+
original = (1..3)
6+
copy = original.dup
67
copy.begin.should == 1
78
copy.end.should == 3
89
copy.should_not.exclude_end?
10+
copy.should_not.equal?(original)
911

1012
copy = ("a"..."z").dup
1113
copy.begin.should == "a"

0 commit comments

Comments
 (0)