diff options
author | aycabta <aycabta@gmail.com> | 2021-09-10 06:08:56 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2021-09-10 06:37:07 +0900 |
commit | 90afe5f11f9c70ebab1ccb318712692884498931 (patch) | |
tree | f898e3a2371c0652015f0f4af0e4a92accd3e0ea /lib/irb.rb | |
parent | 3503c94af501e38164613ef8347174a27346828a (diff) | |
download | ruby-90afe5f11f9c70ebab1ccb318712692884498931.tar.gz |
[ruby/irb] Move IRB::TOPLEVEL_BINDING from exe/irb to lib/irb/workspace.rb
https://github.com/ruby/irb/commit/e736a77076
Diffstat (limited to 'lib/irb.rb')
-rw-r--r-- | lib/irb.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/irb.rb b/lib/irb.rb index c22e6db03b..665f67b946 100644 --- a/lib/irb.rb +++ b/lib/irb.rb @@ -669,6 +669,8 @@ module IRB lines = lines.reverse if order == :bottom lines.map{ |l| l + "\n" }.join } + # The "<top (required)>" in "(irb)" may be the top level of IRB so imitate the main object. + message = message.gsub(/\(irb\):(?<num>\d+):in `<(?<frame>top \(required\))>'/) { "(irb):#{$~[:num]}:in `<main>'" } puts message end print "Maybe IRB bug!\n" if irb_bug |