summaryrefslogtreecommitdiff
path: root/lib/irb/extend-command.rb
diff options
context:
space:
mode:
authorStan Lo <stan001212@gmail.com>2023-03-30 17:17:17 +0100
committergit <svn-admin@ruby-lang.org>2023-04-02 15:34:28 +0000
commitcd94bcdc46fc5d8f6bc0da23223c75335677d253 (patch)
tree046e661bc4906f4fa9b70d4f77284f2cf0fb5838 /lib/irb/extend-command.rb
parentf25791884c8efa5ea6598c82ae5015f5fcfb8ebb (diff)
[ruby/irb] Don't check RUBY_ENGINE when deciding whether to accept kargs
Ruby implementations like JRuby and TruffleRuby already indicate their compatibility target with RUBY_VERSION. We don't need to exclude them from accepting keyword arguments as long as they target 2.7+. https://github.com/ruby/irb/commit/bf20faa4e6 Co-authored-by: Kevin Menard <kevin@nirvdrum.com>
Diffstat (limited to 'lib/irb/extend-command.rb')
-rw-r--r--lib/irb/extend-command.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/irb/extend-command.rb b/lib/irb/extend-command.rb
index e68b79daa7..4018eb13a6 100644
--- a/lib/irb/extend-command.rb
+++ b/lib/irb/extend-command.rb
@@ -256,7 +256,7 @@ module IRB # :nodoc:
end
if load_file
- kwargs = ", **kwargs" if RUBY_ENGINE == "ruby" && RUBY_VERSION >= "2.7.0"
+ kwargs = ", **kwargs" if RUBY_VERSION >= "2.7.0"
line = __LINE__; eval %[
def #{cmd_name}(*opts#{kwargs}, &b)
Kernel.require_relative "#{load_file}"