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

Non MRI:9907 test cases fail in test_assignment:test_assign_private_self #3575

Open
enebo opened this issue Dec 31, 2015 · 0 comments
Open

Comments

@enebo
Copy link
Member

enebo commented Dec 31, 2015

Specifically:

    o = Object.new
    class << o
      private
      def foo; 42; end
      def [](i); 42; end
      def foo=(a); 42; end
      def []=(i, a); 42; end
    end

    assert_raise(NoMethodError) {
      o.instance_eval {o.foo = 1}
    }
    assert_nothing_raised(NoMethodError) {
      assert_equal(1, o.instance_eval {self.foo = 1})
    }

    assert_raise(NoMethodError) {
      o.instance_eval {o[0] = 1}
    }

The rest of the tests are fixed by #3573

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

1 participant