method redefined warning removed!

This commit is contained in:
Arun Agrawal
2011-10-29 15:45:04 +05:30
parent 74f3f19a83
commit 3fa8f362ad

View File

@@ -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')