diff options
author | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-24 03:53:27 +0000 |
---|---|---|
committer | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-24 03:53:27 +0000 |
commit | 106c9883e11673fa31e3854d7e24b97f4c1ba9fd (patch) | |
tree | ec8528ed8bf060ad891770220295422bbd8a62da /lib/irb.rb | |
parent | f8523d35bf3e8ec4a705b1dd45648e1b4352199a (diff) |
irb.rb: show source around binding.irb on start
[Feature #14124] [ruby-dev:50319] [close GH-1764]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/irb.rb')
-rw-r--r-- | lib/irb.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/irb.rb b/lib/irb.rb index 3c549d2c6e..dcc160f140 100644 --- a/lib/irb.rb +++ b/lib/irb.rb @@ -706,6 +706,8 @@ class Binding undef irb if method_defined?(:irb) def irb IRB.setup(eval("__FILE__")) - IRB::Irb.new(IRB::WorkSpace.new(self)).run(IRB.conf) + workspace = IRB::WorkSpace.new(self) + STDOUT.print(workspace.code_around_binding) + IRB::Irb.new(workspace).run(IRB.conf) end end |