Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object#methods(false) broken on new Rubies #4

Closed
julik opened this issue Jun 13, 2011 · 1 comment
Closed

Object#methods(false) broken on new Rubies #4

julik opened this issue Jun 13, 2011 · 1 comment

Comments

@julik
Copy link
Contributor

julik commented Jun 13, 2011

I've found that new Rubies do not really love Object#methods(false) - it's not documented anymore, and delegates explode with it. Delegates that means also tempfiles and all the rest of the affair - which is actually pretty broken. Why don'y we replace it with singleton_methods? This gets rid of the problem.

I've filed an issue with ruby-core on delegates
http://redmine.ruby-lang.org/issues/4882

but in the meantime I've prepared a handy commit for you here
julik@4acea00

Here's what happens because of this problem:

  1. Error:
    test_write_larger_than_max_swaps_tempfile(TestBufferIO):
    ArgumentError: wrong number of arguments (1 for 0)
    /Users/julik/.rvm/gems/ruby-1.9.2-p180/gems/flexmock-0.9.0/lib/flexmock/partial_mock.rb:201:in singleton?' /Users/julik/.rvm/gems/ruby-1.9.2-p180/gems/flexmock-0.9.0/lib/flexmock/partial_mock.rb:236:instow_existing_definition'
    /Users/julik/.rvm/gems/ruby-1.9.2-p180/gems/flexmock-0.9.0/lib/flexmock/partial_mock.rb:92:in add_mock_method' /Users/julik/.rvm/gems/ruby-1.9.2-p180/gems/flexmock-0.9.0/lib/flexmock/partial_mock.rb:46:ininitialize'

Also, please be so kind to either fix your bug report form or disable the Issues tab here. Or both. Or disable the form and enable Issues. Or neither. Dunno.
http://www.picupine.com/629b3b8x

@jimweirich
Copy link
Owner

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants