1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

lib/pp.rb (Range#pretty_print): support endless range

`pp(1..)` should print `"(1..)"` instead of `"(1..nil)"`.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mame 2018-12-03 01:39:45 +00:00
parent afa685398e
commit 2c840bbfef

View file

@ -386,7 +386,7 @@ class Range # :nodoc:
q.breakable '' q.breakable ''
q.text(self.exclude_end? ? '...' : '..') q.text(self.exclude_end? ? '...' : '..')
q.breakable '' q.breakable ''
q.pp self.end q.pp self.end if self.end
end end
end end