mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@ab32a1a
This commit is contained in:
parent
f616e81637
commit
d3d5ef0cca
74 changed files with 1201 additions and 324 deletions
|
@ -49,4 +49,13 @@ describe "String#dup" do
|
|||
orig.should == "xtring"
|
||||
dup.should == "string"
|
||||
end
|
||||
|
||||
it "does not modify the original setbyte-mutated string when changing dupped string" do
|
||||
orig = "a"
|
||||
orig.setbyte 0, "b".ord
|
||||
copy = orig.dup
|
||||
orig.setbyte 0, "c".ord
|
||||
orig.should == "c"
|
||||
copy.should == "b"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue