summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-12-29 14:54:13 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-12-29 14:54:13 +0000
commit6779556b23018b057236668d8a9f6cb2c0bb64e0 (patch)
tree8817ddfa47cec1c9c32fa0eb1105682ed90795d3 /test
parentde3bff164c3b8405f40d2e89cf726f7e865102d1 (diff)
fix "-e:1: undefined method `sub' for main:Object (NoMethodError)"
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_system.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_system.rb b/test/ruby/test_system.rb
index 826c615cd3..298f3c0435 100644
--- a/test/ruby/test_system.rb
+++ b/test/ruby/test_system.rb
@@ -42,7 +42,7 @@ class TestSystem < Test::Unit::TestCase
end
tmp.close
- `#{ruby} -i.bak -pe 'sub(/^[0-9]+$/){$&.to_i * 5}' script_tmp`
+ `#{ruby} -i.bak -pe '$_.sub!(/^[0-9]+$/){$&.to_i * 5}' script_tmp`
tmp = open("script_tmp", "r")
while tmp.gets
assert_equal(0, $_.to_i % 5)