mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
fb67d4fc77
This has been unstable on AppVeyor mswin since the introduction
3fd83cb6fc
.
https://ci.appveyor.com/project/ruby/ruby/builds/27103307/job/j7xwjmsos2k22cck
Let's have it in pending.rb to be fixed.
44 lines
561 B
Ruby
44 lines
561 B
Ruby
assert_equal 'A', %q{
|
|
class A
|
|
@@a = 'A'
|
|
def a=(x)
|
|
@@a = x
|
|
end
|
|
def a
|
|
@@a
|
|
end
|
|
end
|
|
|
|
B = A.dup
|
|
B.new.a = 'B'
|
|
A.new.a
|
|
}, '[ruby-core:17019]'
|
|
|
|
assert_equal 'ok', %q{
|
|
def m
|
|
lambda{
|
|
proc{
|
|
return :ng1
|
|
}
|
|
}.call.call
|
|
:ng2
|
|
end
|
|
|
|
begin
|
|
m()
|
|
rescue LocalJumpError
|
|
:ok
|
|
end
|
|
}
|
|
|
|
assert_normal_exit %q{
|
|
r = Range.allocate
|
|
def r.<=>(o) true end
|
|
r.instance_eval { initialize r, r }
|
|
r.inspect
|
|
}
|
|
|
|
# This randomly fails on mswin.
|
|
assert_equal %q{[]}, %q{
|
|
Thread.new{sleep}.backtrace
|
|
}
|