Browse files

method redefined warning removed!

  • Loading branch information...
1 parent 74f3f19 commit 3fa8f362ad09a6f94ab012094014e31513ee36e0 @arunagw arunagw committed Oct 29, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 railties/lib/rails/test_unit/testing.rake
1 railties/lib/rails/test_unit/testing.rake
@@ -61,6 +61,7 @@ end
# Recreated here from Active Support because :uncommitted needs it before Rails is available
module Kernel
+ remove_method :silence_stderr # Removing old method to prevent method redefined warning
def silence_stderr
old_stderr = STDERR.dup
STDERR.reopen(RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ ? 'NUL:' : '/dev/null')

3 comments on commit 3fa8f36

Ruby on Rails member

Perfect! :)

Ruby on Rails member

According to the comment, we need to reimplement silence_stderr because of Rails loading order. This implementation dates from 2006, maybe this is no longer the case and we could simply require the relevant part from ActiveSupport?

Ruby on Rails member

I will check and fix this.

Please sign in to comment.