Skip to content

Commit

Permalink
User Kernel#warn instead of $stderr.puts for deprecation messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
bblimke committed Oct 11, 2010
1 parent fe8fa8e commit aa22f38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/webmock/deprecation.rb
Expand Up @@ -2,7 +2,7 @@ module WebMock
class Deprecation
class << self
def warning(message)
$stderr.puts "WebMock deprecation warning: #{message}"
warn "WebMock deprecation warning: #{message}"
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/webmock/webmock.rb
Expand Up @@ -3,7 +3,7 @@ module WebMock
def self.included(clazz)
WebMock::Deprecation.warning("include WebMock is deprecated. Please include WebMock::API instead")
if clazz.instance_methods.map(&:to_s).include?('request')
$stderr.puts "WebMock#request was not included in #{clazz} to avoid name collision"
warn "WebMock#request was not included in #{clazz} to avoid name collision"
else
clazz.class_eval do
def request(method, uri)
Expand Down

0 comments on commit aa22f38

Please sign in to comment.