зеркало из https://github.com/github/ruby.git
* bootstraptest/test_knownbug.rb: fix a test.
"block_given?" returns true if "yield" can be used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
2d9135f7a8
Коммит
e07663ec1f
|
@ -1,3 +1,8 @@
|
||||||
|
Tue May 20 01:43:44 2008 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
|
* bootstraptest/test_knownbug.rb: fix a test.
|
||||||
|
"block_given?" returns true if "yield" can be used.
|
||||||
|
|
||||||
Tue May 20 01:07:19 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
Tue May 20 01:07:19 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
||||||
|
|
||||||
* parse.y (assignable_gen): when "self = 1" was evalueted, unnecessary
|
* parse.y (assignable_gen): when "self = 1" was evalueted, unnecessary
|
||||||
|
|
|
@ -7,9 +7,9 @@ assert_equal 'ok', %q{
|
||||||
class C
|
class C
|
||||||
define_method(:foo) {
|
define_method(:foo) {
|
||||||
if block_given?
|
if block_given?
|
||||||
:ok
|
|
||||||
else
|
|
||||||
:ng
|
:ng
|
||||||
|
else
|
||||||
|
:ok
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
Загрузка…
Ссылка в новой задаче