summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_rubyoptions.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index 339999a17e..0f883420d7 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -553,4 +553,14 @@ class TestRubyOptions < Test::Unit::TestCase
assert_in_out_err(["-C", dir, a], "", [], /LoadError/, bug3851)
end
end
+
+ def test_pflag_gsub
+ bug7157 = '[ruby-core:47967]'
+ assert_in_out_err(['-p', '-e', 'gsub(/t.*/){"TEST"}'], %[test], %w[TEST], [], bug7157)
+ end
+
+ def test_pflag_sub
+ bug7157 = '[ruby-core:47967]'
+ assert_in_out_err(['-p', '-e', 'sub(/t.*/){"TEST"}'], %[test], %w[TEST], [], bug7157)
+ end
end