Permalink
Browse files

Call the original warn method if $DEBUG is enabled.

  • Loading branch information...
1 parent cbe49d0 commit 091558be57d28be401b2d78c281c58000f86f304 @postmodern committed Jun 24, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/warnings/mixin.rb
View
2 lib/warnings/mixin.rb
@@ -15,6 +15,8 @@ module Mixin
# @return [nil]
#
def warn(message)
+ super(message) if $DEBUG
+
$WARNINGS << Warning.new(message,caller)
return nil
end

0 comments on commit 091558b

Please sign in to comment.