Skip to content

Exception when comparing Time with nil using === #1606

@joelnordell

Description

@joelnordell

In MRI ruby 1.9.3:

1.9.3p327 :001 > Time.new === nil
 => false 

In JRuby 1.7.10:

jruby-1.7.10 :001 > Time.new === nil
TypeError: no implicit conversion from nil to integer
    from org/jruby/RubyTime.java:608:in `==='
    from (irb):1:in `evaluate'
    from org/jruby/RubyKernel.java:1119:in `eval'
    from org/jruby/RubyKernel.java:1519:in `loop'
    from org/jruby/RubyKernel.java:1282:in `catch'
    from org/jruby/RubyKernel.java:1282:in `catch'
    from ~/.rvm/rubies/jruby-1.7.10/bin/irb:13:in `(root)'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions