From 259d9dbc20f7841c11460bf0ae0530ba121b4799 Mon Sep 17 00:00:00 2001 From: usa Date: Tue, 16 Oct 2012 01:21:57 +0000 Subject: merge revision(s) 37177: [Backport #7157] * ruby.c (rb_f_sub, rb_f_gsub): pass the given block. [ruby-core:47967] [Bug #7157] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@37205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_rubyoptions.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test') 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 -- cgit v1.2.3