Skip to content
This repository has been archived by the owner on Mar 26, 2023. It is now read-only.

Commit

Permalink
handle warnings in less places
Browse files Browse the repository at this point in the history
  • Loading branch information
timfel committed Oct 26, 2011
1 parent 29f1669 commit b3bb827
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/kernel/common/kernel.rb
Expand Up @@ -126,16 +126,14 @@ def FloatValue(obj)
# private :FloatValue # TODO: uncomment

def warn(warning)
$stderr.write "#{warning}\n" unless $VERBOSE._equal?(false)
$stderr.write "#{warning}\n" if $VERBOSE._equal?(true)
nil
end
module_function :warn

def __cext_warning(warning)
# called by rb_warning
if $VERBOSE
$stderr.write "#{warning}\n"
end
warn(warning)
end

# from timeout.rb
Expand Down

0 comments on commit b3bb827

Please sign in to comment.