mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
fiddle/import.rb: suppress warning
* ext/fiddle/lib/fiddle/import.rb: suppress exception report when $DEBUG is enabled. [ruby-core:86536] [Bug #14686] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9090241e61
commit
eb02a846a4
2 changed files with 6 additions and 1 deletions
|
@ -157,7 +157,8 @@ module Fiddle
|
|||
# :stopdoc:
|
||||
CALL_TYPE_TO_ABI = Hash.new { |h, k|
|
||||
raise RuntimeError, "unsupported call type: #{k}"
|
||||
}.merge({ :stdcall => (Function::STDCALL rescue Function::DEFAULT),
|
||||
}.merge({ :stdcall => Function.const_defined?(:STDCALL) ? Function::STDCALL :
|
||||
Function::DEFAULT,
|
||||
:cdecl => Function::DEFAULT,
|
||||
nil => Function::DEFAULT
|
||||
}).freeze
|
||||
|
|
|
@ -147,5 +147,9 @@ module Fiddle
|
|||
r = LIBC.atof("12.34")
|
||||
assert_includes(12.00..13.00, r)
|
||||
end
|
||||
|
||||
def test_no_message_with_debug
|
||||
assert_in_out_err(%w[--debug -rfiddle/import], 'p Fiddle::Importer', ['Fiddle::Importer'])
|
||||
end
|
||||
end
|
||||
end if defined?(Fiddle)
|
||||
|
|
Loading…
Reference in a new issue