diff options
Diffstat (limited to 'spec/ruby/core/string/sub_spec.rb')
| -rw-r--r-- | spec/ruby/core/string/sub_spec.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/ruby/core/string/sub_spec.rb b/spec/ruby/core/string/sub_spec.rb index 4f9f87a433..6ff28ec851 100644 --- a/spec/ruby/core/string/sub_spec.rb +++ b/spec/ruby/core/string/sub_spec.rb @@ -232,10 +232,10 @@ describe "String#sub with pattern and block" do offsets = [] str.sub(/([aeiou])/) do - md = $~ - md.string.should == str - offsets << md.offset(0) - str + md = $~ + md.string.should == str + offsets << md.offset(0) + str end.should == "hhellollo" offsets.should == [[1, 2]] @@ -339,10 +339,10 @@ describe "String#sub! with pattern and block" do offsets = [] str.dup.sub!(/([aeiou])/) do - md = $~ - md.string.should == str - offsets << md.offset(0) - str + md = $~ + md.string.should == str + offsets << md.offset(0) + str end.should == "hhellollo" offsets.should == [[1, 2]] |
