ruby-changes:2626
From: ko1@a...
Date: 6 Dec 2007 09:27:56 +0900
Subject: [ruby-changes:2626] nobu - Ruby:r14117 (trunk): * bootstraptest/test_knownbug.rb: test for .
nobu 2007-12-06 09:27:35 +0900 (Thu, 06 Dec 2007)
New Revision: 14117
Modified files:
trunk/bootstraptest/test_knownbug.rb
Log:
* bootstraptest/test_knownbug.rb: test for [ruby-talk:266422].
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/bootstraptest/test_knownbug.rb?r1=14117&r2=14116
Index: bootstraptest/test_knownbug.rb
===================================================================
--- bootstraptest/test_knownbug.rb (revision 14116)
+++ bootstraptest/test_knownbug.rb (revision 14117)
@@ -18,3 +18,12 @@
assert_normal_exit %q{
"abcd\xf0".force_encoding("utf-8").reverse.inspect
}, '[ruby-dev:32448]'
+
+assert_equal 'hi', %q{
+ class C
+ define_method(:foo) { |arg, &block|
+ if block then block.call else arg end
+ }
+ end
+ C.new.foo("ng") {"ok"}
+}, '[ruby-talk:266422]'
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml