2007-08-28 23:48:19 -04:00
|
|
|
#
|
|
|
|
# This test file concludes tests which point out known bugs.
|
|
|
|
# So all tests will cause failure.
|
|
|
|
#
|
2007-12-28 23:27:39 -05:00
|
|
|
|
2008-01-07 02:07:44 -05:00
|
|
|
assert_equal 'ok', %q{
|
|
|
|
class C
|
|
|
|
define_method(:foo) {
|
|
|
|
if block_given?
|
2008-01-25 13:02:01 -05:00
|
|
|
:ng
|
2008-05-19 12:47:42 -04:00
|
|
|
else
|
|
|
|
:ok
|
2008-01-07 02:07:44 -05:00
|
|
|
end
|
|
|
|
}
|
|
|
|
end
|
2008-01-25 13:02:01 -05:00
|
|
|
C.new.foo {}
|
2008-01-07 02:07:44 -05:00
|
|
|
}, '[ruby-core:14813]'
|
|
|
|
|
|
|
|
assert_equal 'ok', %q{
|
|
|
|
class C
|
|
|
|
define_method(:foo) {
|
|
|
|
if block_given?
|
|
|
|
:ng
|
2008-01-25 13:02:01 -05:00
|
|
|
else
|
|
|
|
:ok
|
2008-01-07 02:07:44 -05:00
|
|
|
end
|
|
|
|
}
|
|
|
|
end
|
2008-01-25 13:02:01 -05:00
|
|
|
C.new.foo
|
2008-01-07 02:07:44 -05:00
|
|
|
}, '[ruby-core:14813]'
|
2008-01-07 05:01:34 -05:00
|
|
|
|
2008-04-06 23:28:23 -04:00
|
|
|
assert_equal %q{[:bar, :foo]}, %q{
|
|
|
|
def foo
|
|
|
|
klass = Class.new do
|
|
|
|
define_method(:bar) do
|
|
|
|
return :bar
|
|
|
|
end
|
|
|
|
end
|
|
|
|
[klass.new.bar, :foo]
|
|
|
|
end
|
|
|
|
foo
|
|
|
|
}, "[ ruby-Bugs-19304 ]"
|
|
|
|
|