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

add comment about special-case for jruby.

This commit is contained in:
Robert Gleeson 2014-01-17 10:27:32 +01:00
parent ea6cd413a4
commit 8b0866b552

View file

@ -131,7 +131,9 @@ class Pry
if obj.kind_of?(Module) && obj.name.to_s != "" && obj.name.to_s.length <= max_length
obj.name.to_s
elsif TOPLEVEL_BINDING.eval('self') == obj
# special case for 'main' object :)
# special-case to support jruby.
# fixed as of https://github.com/jruby/jruby/commit/d365ebd309cf9df3dde28f5eb36ea97056e0c039
# we can drop in the future.
obj.to_s
elsif Pry.config.prompt_safe_objects.any? { |v| v === obj } && obj.inspect.length <= max_length
obj.inspect