From c693dfd7ef686ccda9db18340bc426e1227e5b53 Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Wed, 11 Jan 2023 21:26:12 +0000 Subject: [ruby/irb] Drop unused arguments in `RubyLex` (https://github.com/ruby/irb/pull/504) * Simplify `RubyLex#set_prompt` It's optional argument is never used by any caller. * Remove the optional `p` argument from `RubyLex#set_input` The argument is only used in a test case, which can be easily replaced by a block argument. --- test/irb/test_ruby_lex.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/irb/test_ruby_lex.rb b/test/irb/test_ruby_lex.rb index 1c1ce92e6a..8c8aa74079 100644 --- a/test/irb/test_ruby_lex.rb +++ b/test/irb/test_ruby_lex.rb @@ -62,7 +62,9 @@ module TestIRB context = build_context(local_variables) io = proc{ lines.join("\n") } - ruby_lex.set_input(io, io, context: context) + ruby_lex.set_input(io, context: context) do + lines.join("\n") + end ruby_lex.lex(context) ruby_lex end -- cgit v1.2.3