Skip to content

Conversation

@tompng
Copy link
Member

@tompng tompng commented Oct 9, 2024

nil..nil nil..false false..nil false..false was all displayed ..

After this fix

$ ruby -Ilib -e binding.irb
irb(main):001> nil..false
=> ..false
irb(main):002> false..nil
=> false..
irb(main):003> false..false
=> false..false
irb(main):004> nil..nil
=> nil..nil
irb(main):005> 

Distinguishing nil..nil from nil..false will make it easy to debug when I mistakenly created wrong range.

Copy link
Member

@nobu nobu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't seem to need to repeat the same comparisons.

Co-authored-by: Nobuyoshi Nakada <nobu.nakada@gmail.com>
@nobu nobu merged commit fce84ae into ruby:master Nov 19, 2024
22 checks passed
@tompng tompng deleted the false_nil_range branch November 19, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants