Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.6.2
    • Fix Version/s: JRuby 1.6.3, JRuby 1.7.0.pre1
    • Component/s: Ruby 1.9.2
    • Labels:
      None
    • Environment:
      jruby 1.6.2 (ruby-1.9.2-p136) (2011-05-23 e2ea975) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_25) [linux-amd64-java]
    • Testcase included:
      yes
    • Number of attachments :
      0

      Description

      When calling each_with_index followed by map, the block passed to map gets only the value and not the index. See this gist:

      https://gist.github.com/1032299

      The above test works fine in JRuby 1.6.2 in 1.8 mode, and in MRI 1.9.2. It fails in JRuby 1.9.2 using 1.9 mode.

        Issue Links

          Activity

          Hide
          Dan Pilone added a comment -

          Seeing the same problem but I'm pretty sure this is very closely related to http://jira.codehaus.org/browse/JRUBY-5839. In my case yielding values as an array fixed map. I suspect each_with_index is running into a similar issue.

          Show
          Dan Pilone added a comment - Seeing the same problem but I'm pretty sure this is very closely related to http://jira.codehaus.org/browse/JRUBY-5839 . In my case yielding values as an array fixed map. I suspect each_with_index is running into a similar issue.
          Hide
          Hiro Asari added a comment -

          As Dan pointed out, this appears to be related to JRUBY-5839, which as been resolved recently.

          Show
          Hiro Asari added a comment - As Dan pointed out, this appears to be related to JRUBY-5839 , which as been resolved recently.

            People

            • Assignee:
              Charles Oliver Nutter
              Reporter:
              Marcus Brito
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: