зеркало из https://github.com/github/ruby.git
Suppress method redefinition warnings
This commit is contained in:
Родитель
5f736d4319
Коммит
cc68084652
|
@ -464,12 +464,13 @@ class TestISeq < Test::Unit::TestCase
|
|||
RUBY
|
||||
|
||||
iseq_bin = iseq.to_binary
|
||||
iseq = ISeq.load_from_binary(iseq_bin)
|
||||
lines = []
|
||||
TracePoint.new(tracepoint_type){|tp|
|
||||
next unless tp.path == filename
|
||||
lines << tp.lineno
|
||||
}.enable{
|
||||
ISeq.load_from_binary(iseq_bin).eval
|
||||
EnvUtil.suppress_warning {iseq.eval}
|
||||
}
|
||||
|
||||
lines
|
||||
|
|
|
@ -269,6 +269,7 @@ class TestPrime < Test::Unit::TestCase
|
|||
end
|
||||
ensure
|
||||
class << Integer
|
||||
remove_method :sqrt
|
||||
alias_method :sqrt, :org_sqrt
|
||||
remove_method :org_sqrt
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче