aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-01-02 06:25:01 +0000
committerktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-01-02 06:25:01 +0000
commit66f9d5fe11ca774b850cd55ca3476eb23d6db08a (patch)
treee791afc1a91c613fd5f40171485093b757c6f838
parent7d9fe82be47d67e44069e80904ef06d34d2cce29 (diff)
downloadruby-66f9d5fe11ca774b850cd55ca3476eb23d6db08a.tar.gz
* test/ruby/test_object.rb (test_send_with_block): moved from
bootstraptest/test_flow.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--bootstraptest/test_flow.rb13
-rw-r--r--test/ruby/test_object.rb14
3 files changed, 19 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 87535e9cc6..de51753e05 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Jan 2 15:18:54 2012 Kazuki Tsujimoto <kazuki@callcc.net>
+
+ * test/ruby/test_object.rb (test_send_with_block): moved from
+ bootstraptest/test_flow.rb.
+
Mon Jan 2 15:10:11 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
* lib/test/unit/parallel.rb: use pack("m0") instead of
diff --git a/bootstraptest/test_flow.rb b/bootstraptest/test_flow.rb
index edc6e46f10..d40d814fbc 100644
--- a/bootstraptest/test_flow.rb
+++ b/bootstraptest/test_flow.rb
@@ -549,16 +549,3 @@ assert_equal %Q{ENSURE\n}, %q{
assert_equal "false", src + %q{e.all? {false}}, bug
assert_equal "true", src + %q{e.include?(:foo)}, bug
end
-assert_equal %q{ok}, %q{
- $x = :ok
- o = Object.new
- def o.inspect
- yield if block_given?
- super
- end
- begin
- nil.public_send(o) {$x = :ng}
- rescue
- end
- $x
-}
diff --git a/test/ruby/test_object.rb b/test/ruby/test_object.rb
index 4ce422f7b5..5c6824e8a5 100644
--- a/test/ruby/test_object.rb
+++ b/test/ruby/test_object.rb
@@ -437,6 +437,20 @@ class TestObject < Test::Unit::TestCase
assert_raise(ArgumentError) { 1.send }
end
+ def test_send_with_block
+ x = :ok
+ o = Object.new
+ def o.inspect
+ yield if block_given?
+ super
+ end
+ begin
+ nil.public_send(o) { x = :ng }
+ rescue
+ end
+ assert_equal(:ok, x)
+ end
+
def test_no_superclass_method
bug2312 = '[ruby-dev:39581]'