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
This commit is contained in:
parent
de3bff164c
commit
6779556b23
@ -42,7 +42,7 @@ class TestSystem < Test::Unit::TestCase
|
|||||||
end
|
end
|
||||||
tmp.close
|
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")
|
tmp = open("script_tmp", "r")
|
||||||
while tmp.gets
|
while tmp.gets
|
||||||
assert_equal(0, $_.to_i % 5)
|
assert_equal(0, $_.to_i % 5)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user