Skip to content

Commit

Permalink
macruby: no format_datetime or msg2str
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy committed Nov 22, 2009
1 parent e1935e3 commit 6d91e7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions activesupport/lib/active_support/core_ext/logger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
end
end

3 comments on commit 6d91e7d

@alloy
Copy link
Contributor

@alloy alloy commented on 6d91e7d Nov 23, 2009

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@alloy
Copy link
Contributor

@alloy alloy commented on 6d91e7d Nov 23, 2009

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

http://github.com/masterkain/macruby/commit/fc682c00466f26e7bb971832c3d5e2d948f91c8b

Thanks for using beta software! ;-)

@alloy
Copy link
Contributor

@alloy alloy commented on 6d91e7d Nov 23, 2009

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, method_defined? has been fixed, so you could probably revert this: http://github.com/masterkain/macruby/commit/b7806fed28b327b95cb3b42f293477937a693ff4

Please sign in to comment.