summaryrefslogtreecommitdiff
path: root/lib/pp.rb
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-03 01:39:45 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-03 01:39:45 +0000
commit2c840bbfef2d6a06282f3698548f95ef85819ca7 (patch)
treeee3c0dd66ce6ce373af589e7251ec85d08fc6200 /lib/pp.rb
parentafa685398e6c098a55bb2d0565e8f1bd380e4ab9 (diff)
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
Diffstat (limited to 'lib/pp.rb')
-rw-r--r--lib/pp.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pp.rb b/lib/pp.rb
index ad0391c012..cbc49e72e9 100644
--- a/lib/pp.rb
+++ b/lib/pp.rb
@@ -386,7 +386,7 @@ class Range # :nodoc:
q.breakable ''
q.text(self.exclude_end? ? '...' : '..')
q.breakable ''
- q.pp self.end
+ q.pp self.end if self.end
end
end