diff options
| author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-12-29 14:54:13 +0000 |
|---|---|---|
| committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-12-29 14:54:13 +0000 |
| commit | 1ca6a4a39ce8907d46c4148bcdf2b0b367a6aab7 (patch) | |
| tree | 8817ddfa47cec1c9c32fa0eb1105682ed90795d3 /test/ruby/test_system.rb | |
| parent | b0bcdbd2a68e313f4f178cc41e7984a539c5bf27 (diff) | |
| download | ruby-1ca6a4a39ce8907d46c4148bcdf2b0b367a6aab7.tar.gz ruby-1ca6a4a39ce8907d46c4148bcdf2b0b367a6aab7.tar.xz ruby-1ca6a4a39ce8907d46c4148bcdf2b0b367a6aab7.zip | |
fix "-e:1: undefined method `sub' for main:Object (NoMethodError)"
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_system.rb')
| -rw-r--r-- | test/ruby/test_system.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_system.rb b/test/ruby/test_system.rb index 826c615cd..298f3c043 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) |
