Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

macruby: no format_datetime or msg2str

  • Loading branch information...
commit 6d91e7dca163ef55dde319452b21b767e8a0df33 1 parent e1935e3
Jeremy Kemper jeremy authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 activesupport/lib/active_support/core_ext/logger.rb
4 activesupport/lib/active_support/core_ext/logger.rb
@@ -137,10 +137,10 @@ def format_message(severity, timestamp, msg, progname)
attr_writer :formatter
public :formatter=
- alias old_format_datetime format_datetime
+ alias old_format_datetime format_datetime if method_defined?(:format_datetime)
def format_datetime(datetime) datetime end
- alias old_msg2str msg2str
+ alias old_msg2str msg2str if method_defined?(:msg2str)
def msg2str(msg) msg end

3 comments on commit 6d91e7d

Eloy Durán

Hmm, I wonder if the issue isn't that we need to update the stdlib so that our Logger doesn't have :formatter= defined. Do you know by any chance when that method was removed in 1.9.x?

Eloy Durán

So scratch that, I've done some more investigation. It seems our method_defined? impl. falsely returns `false', thus it gets to the part where it tries to alias the method which doesn't/shouldn't exist. We've added a test_vm test for it, I'll have a look into it later on:

Thanks for using beta software! ;-)

Eloy Durán

Ok, method_defined? has been fixed, so you could probably revert this:

Please sign in to comment.
Something went wrong with that request. Please try again.