JRuby (please use github issues at http://bugs.jruby.org)
  1. JRuby (please use github issues at http://bugs.jruby.org)
  2. JRUBY-1192

Proposed MRI bug...method() on aliased method should behave the same as the aliased call itself

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.0.0
    • Fix Version/s: JRuby 1.5
    • Component/s: Interpreter
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Here is reduced testcase:

      # Test weird likely-a-bug where method() will repurpose where super goes to
      class Foo222
        def a; 'a'; end
        def b; 'b'; end
      end
      
      class Bar222 < Foo222
        def a; super; end
        alias b a
      end
      
      test_equal('a', Bar222.new.b)
      test_equal('b', Bar222.new.method(:b).call)
      

      Charlie sent a message to ruby-core on this since this seems like a bug, but we will patch this for now since the fix is pretty simple and we want to be compatible.

        Issue Links

          Activity

          Hide
          Charles Oliver Nutter added a comment -

          This is a clone of the original bug that fixed the issue. Since we believe the original behavior was correct, I'm filing this to continue following up with ruby-core. If they agree to fix it, we will revert to the original behavior on the same schedule.

          Show
          Charles Oliver Nutter added a comment - This is a clone of the original bug that fixed the issue. Since we believe the original behavior was correct, I'm filing this to continue following up with ruby-core. If they agree to fix it, we will revert to the original behavior on the same schedule.
          Hide
          Nick Sieger added a comment -

          Taking out of 1.0.1, seems like an edge case, plus I don't know if patch is ready or has been applied.

          Show
          Nick Sieger added a comment - Taking out of 1.0.1, seems like an edge case, plus I don't know if patch is ready or has been applied.
          Hide
          Charles Oliver Nutter added a comment -

          There's been absolutely no movement on this from Ruby core. Frustrating. We'll leave the broken behavior as-is for now. Rubinius guys also ran into this, and agreed it's a bug.

          Show
          Charles Oliver Nutter added a comment - There's been absolutely no movement on this from Ruby core. Frustrating. We'll leave the broken behavior as-is for now. Rubinius guys also ran into this, and agreed it's a bug.
          Hide
          Charles Oliver Nutter added a comment -

          I have filed an official bug report against ruby 1.8 here: http://redmine.ruby-lang.org/issues/show/1151

          I have also added a spec to RubySpec for this behavior in 41283cb that we can repair and switch to a ruby bug if ruby-core agrees.

          It's also worth noting that 1.9.1 has the correct behavior, always supering up the original method's name.

          Show
          Charles Oliver Nutter added a comment - I have filed an official bug report against ruby 1.8 here: http://redmine.ruby-lang.org/issues/show/1151 I have also added a spec to RubySpec for this behavior in 41283cb that we can repair and switch to a ruby bug if ruby-core agrees. It's also worth noting that 1.9.1 has the correct behavior, always supering up the original method's name.
          Hide
          Vladimir Sizikov added a comment -

          Fixed in rev. c4d1a13 on master branch. MRI's wrong behavior has been officially acknowledged as a bug and it was fixed in 1_8 branch.

          Show
          Vladimir Sizikov added a comment - Fixed in rev. c4d1a13 on master branch. MRI's wrong behavior has been officially acknowledged as a bug and it was fixed in 1_8 branch.

            People

            • Assignee:
              Vladimir Sizikov
              Reporter:
              Thomas E Enebo
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: