JRuby

Incorrect behavior for case/when when true or false are the first conditions

Details

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

Description

ActiveSupport's BufferedLogger has code like:

        case period
        when true;                1
        when false, nil, 0;       MAX_BUFFER_SIZE
        when Integer;             period
        else raise ArgumentError, "Unrecognized auto_flushing period: #{period.inspect}"
        end

0 was incorrectly getting picked up as the true branch.

Activity

Hide
Nick Sieger added a comment -

Fixed in 8886.

Show
Nick Sieger added a comment - Fixed in 8886.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: