Skip to content

Instantly share code, notes, and snippets.

@nassredean
Created December 16, 2015 16:06
Show Gist options
  • Save nassredean/0990ee8dda5aba2106b8 to your computer and use it in GitHub Desktop.
Save nassredean/0990ee8dda5aba2106b8 to your computer and use it in GitHub Desktop.
# lib/awesome_print/inspector.rb (26)
def irb!
return unless defined?(IRB)
unless IRB.version.include?("DietRB")
IRB::Irb.class_eval do
def output_value
ap @context.last_value
end
end
...
end
end
# http://rxr.whitequark.org/mri/source/lib/irb.rb
def output_value # :nodoc:
printf @context.return_format, @context.inspect_last_value
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment