diff options
author | Stan Lo <stan001212@gmail.com> | 2023-04-05 22:40:34 +0100 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-04-05 21:40:40 +0000 |
commit | 2f8e5c80e65a14b3a9298b6cae7ee7fc53890540 (patch) | |
tree | ca1b18b39c4a0d95017361207b635d71a173a639 /lib/irb/cmd/show_source.rb | |
parent | 1587494b0b5f64a9976dcf0bd94dfe98123c2c27 (diff) |
[ruby/irb] Drop Ruby 2.6 support
(https://github.com/ruby/irb/pull/555)
* Remove all Ruby 2.6 support
* Drop Ruby 2.6 specific testing conditions
* Only run Ruby 2.7+ on CI
* Bump Ruby requirement to 2.7+
https://github.com/ruby/irb/commit/3f714b616c
Diffstat (limited to 'lib/irb/cmd/show_source.rb')
-rw-r--r-- | lib/irb/cmd/show_source.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/irb/cmd/show_source.rb b/lib/irb/cmd/show_source.rb index eb21533b56..f4925a8311 100644 --- a/lib/irb/cmd/show_source.rb +++ b/lib/irb/cmd/show_source.rb @@ -27,7 +27,7 @@ module IRB when /\A[A-Z]\w*(::[A-Z]\w*)*\z/ # Const::Name eval(str, irb_context.workspace.binding) # trigger autoload base = irb_context.workspace.binding.receiver.yield_self { |r| r.is_a?(Module) ? r : Object } - file, line = base.const_source_location(str) if base.respond_to?(:const_source_location) # Ruby 2.7+ + file, line = base.const_source_location(str) when /\A(?<owner>[A-Z]\w*(::[A-Z]\w*)*)#(?<method>[^ :.]+)\z/ # Class#method owner = eval(Regexp.last_match[:owner], irb_context.workspace.binding) method = Regexp.last_match[:method] |