We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b51b3c commit cd7c6c6Copy full SHA for cd7c6c6
lib/pp.rb
@@ -488,12 +488,13 @@ def pretty_print_cycle(q) # :nodoc:
488
489
class Range # :nodoc:
490
def pretty_print(q) # :nodoc:
491
- both_nil = self.begin == nil && self.end == nil
492
- q.pp self.begin if self.begin != nil || both_nil
+ begin_nil = self.begin == nil
+ end_nil = self.end == nil
493
+ q.pp self.begin if !begin_nil || end_nil
494
q.breakable ''
495
q.text(self.exclude_end? ? '...' : '..')
496
- q.pp self.end if self.end != nil || both_nil
497
+ q.pp self.end if !end_nil || begin_nil
498
end
499
500
0 commit comments