#481 new
Scott Taylor

ruby 1.9 compatibility in mock proxy

Reported by Scott Taylor | July 25th, 2008 @ 09:57 AM | in No-Milestone-Assigned

Just noticed the following code in spec/mocks/proxy.rb:

72 expectation.advise(args, block) if null_object? unless expectation.expected_messages_received?

73 raise_unexpected_message_args_error(expectation, *args) ...

74 else

=> 75 @target.send :method_missing, sym, *args, &block

76 end

77 end

that @target.send :method_missing surely won't work in ruby 1.9, since send will only work for public methods, and method_missing is almost always private. It should be converted into the following:

@target.instance_eval { method_missing(sym, *args, &block) }

Comments and changes to this ticket

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Behaviour Driven Development for Ruby.

Shared Ticket Bins

People watching this ticket

Tags