Skip to content

Commit

Permalink
Add magic pp and irb methods from 2.5 prelude.
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Apr 12, 2018
1 parent d08501a commit f48399a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions core/src/main/ruby/jruby/kernel/prelude.rb
Expand Up @@ -13,4 +13,25 @@ def self.exclusive
yield
}
end
end

# :stopdoc:
class Binding
def irb
require 'irb'
irb
end

# suppress redefinition warning
alias irb irb # :nodoc:
end

module Kernel
def pp(*objs)
require 'pp'
pp(*objs)
end

# suppress redefinition warning
alias pp pp # :nodoc:
end

0 comments on commit f48399a

Please sign in to comment.