Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: JRuby 1.4.0RC1
    • Fix Version/s: None
    • Component/s: Interpreter
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Not quite reduced test case, but the problem is is ending up as [2] versus [[2]] (where 2 may not be 2 depending on which test case you are looking at below). Interestingly Ruby 1.9 behaves the same as us so it is debatable whether we need to fix this at all:

      class X
        def to_ary
          [1, 2, 3]
        end
      end
       
      x = X.new
       
      puts "a, (*b) = 1, [2]"
      a, (*b) = 1, [2]
      p a == 1
      p b == [[2]]
      p b
       
      puts "a, (*b) = 1, [x]"
      a, (*b) = 1, [x]
      p a == 1
      p b == [[x]]
       
      puts "a, (*b) = 1, [*x]"
      a, (*b) = 1, [*x]
      p a == 1
      p b == [[1, 2, 3]]
       
      puts "a, (*b) = 1, [*2]"
      a, (*b) = 1, [*2]
      p a == 1
      p b == [[2]]
       
      
      

        Activity

        Hide
        Thomas E Enebo added a comment -

        As Charlie suggested and it is a reasonable suggestion....These seem like bugs in 1.8.7 since the double array really does not seem like it is what you want?

        Show
        Thomas E Enebo added a comment - As Charlie suggested and it is a reasonable suggestion....These seem like bugs in 1.8.7 since the double array really does not seem like it is what you want?
        Hide
        Charles Oliver Nutter added a comment -

        Since we're going 1.9 by default in JRuby 1.7, and 1.9+ only after that, I'm calling this Won't Fix. We match 1.9.3 for the given case.

        Show
        Charles Oliver Nutter added a comment - Since we're going 1.9 by default in JRuby 1.7, and 1.9+ only after that, I'm calling this Won't Fix. We match 1.9.3 for the given case.

          People

          • Assignee:
            Charles Oliver Nutter
            Reporter:
            Thomas E Enebo
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: