Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArgumentError in console1984/ext/irb/context.rb after upgrading IRB to 1.15.x #127

Closed
karlentwistle opened this issue Jan 22, 2025 · 0 comments · Fixed by #128
Closed

ArgumentError in console1984/ext/irb/context.rb after upgrading IRB to 1.15.x #127

karlentwistle opened this issue Jan 22, 2025 · 0 comments · Fixed by #128

Comments

@karlentwistle
Copy link

karlentwistle commented Jan 22, 2025

Description

When upgrading from IRB 1.14.3 to either 1.15.0 or 1.15.1, calling any command in the Rails console raises an ArgumentError. Rolling back to IRB 1.14.3 fixes the issue. The full stack trace is below.

Expected behavior

The console should print the last value normally.

Actual behavior

An exception is raised:

/app/vendor/bundle/ruby/3.4.0/gems/console1984-0.2.1/lib/console1984/ext/irb/context.rb:8:in 'inspect_last_value': wrong number of arguments (given 1, expected 0) (ArgumentError)
from /app/vendor/bundle/ruby/3.4.0/gems/irb-1.15.1/lib/irb.rb:542:in 'block in IRB::Irb#output_value'
from /app/vendor/bundle/ruby/3.4.0/gems/irb-1.15.1/lib/irb/pager.rb:66:in 'IRB::Pager.page_with_preview'
from /app/vendor/bundle/ruby/3.4.0/gems/irb-1.15.1/lib/irb.rb:541:in 'IRB::Irb#output_value'
from /app/vendor/bundle/ruby/3.4.0/gems/irb-1.15.1/lib/irb.rb:209:in 'block (2 levels) in IRB::Irb#eval_input'
from /app/vendor/bundle/ruby/3.4.0/gems/irb-1.15.1/lib/irb.rb:512:in 'IRB::Irb#signal_status'
from /app/vendor/bundle/ruby/3.4.0/gems/irb-1.15.1/lib/irb.rb:193:in 'block in IRB::Irb#eval_input'
from /app/vendor/bundle/ruby/3.4.0/gems/irb-1.15.1/lib/irb.rb:272:in 'block in IRB::Irb#each_top_level_statement'
from <internal:kernel>:168:in 'Kernel#loop'
from /app/vendor/bundle/ruby/3.4.0/gems/irb-1.15.1/lib/irb.rb:269:in 'IRB::Irb#each_top_level_statement'
from /app/vendor/bundle/ruby/3.4.0/gems/irb-1.15.1/lib/irb.rb:192:in 'IRB::Irb#eval_input'
from /app/vendor/bundle/ruby/3.4.0/gems/irb-1.15.1/lib/irb.rb:173:in 'block in IRB::Irb#run'
from /app/vendor/bundle/ruby/3.4.0/gems/irb-1.15.1/lib/irb.rb:172:in 'Kernel#catch'
from /app/vendor/bundle/ruby/3.4.0/gems/irb-1.15.1/lib/irb.rb:172:in 'IRB::Irb#run'
from /app/vendor/bundle/ruby/3.4.0/gems/railties-7.2.2.1/lib/rails/commands/console/irb_console.rb:129:in 'Rails::Console::IRBConsole#start'
from /app/vendor/bundle/ruby/3.4.0/gems/railties-7.2.2.1/lib/rails/commands/console/console_command.rb:59:in 'Rails::Console#start'
from /app/vendor/bundle/ruby/3.4.0/gems/railties-7.2.2.1/lib/rails/commands/console/console_command.rb:8:in 'Rails::Console.start'
from /app/vendor/bundle/ruby/3.4.0/gems/railties-7.2.2.1/lib/rails/commands/console/console_command.rb:87:in 'Rails::Command::ConsoleCommand#perform'
from /app/vendor/bundle/ruby/3.4.0/gems/thor-1.3.2/lib/thor/command.rb:28:in 'Thor::Command#run'
from /app/vendor/bundle/ruby/3.4.0/gems/thor-1.3.2/lib/thor/invocation.rb:127:in 'Thor::Invocation#invoke_command'
from /app/vendor/bundle/ruby/3.4.0/gems/railties-7.2.2.1/lib/rails/command/base.rb:178:in 'Rails::Command::Base#invoke_command'
from /app/vendor/bundle/ruby/3.4.0/gems/thor-1.3.2/lib/thor.rb:538:in 'Thor.dispatch'
from /app/vendor/bundle/ruby/3.4.0/gems/railties-7.2.2.1/lib/rails/command/base.rb:73:in 'Rails::Command::Base.perform'
from /app/vendor/bundle/ruby/3.4.0/gems/railties-7.2.2.1/lib/rails/command.rb:71:in 'block in Rails::Command.invoke'
from /app/vendor/bundle/ruby/3.4.0/gems/railties-7.2.2.1/lib/rails/command.rb:149:in 'Rails::Command.with_argv'
from /app/vendor/bundle/ruby/3.4.0/gems/railties-7.2.2.1/lib/rails/command.rb:69:in 'Rails::Command.invoke'
from /app/vendor/bundle/ruby/3.4.0/gems/railties-7.2.2.1/lib/rails/commands.rb:18:in '<top (required)>'
from /app/vendor/ruby-3.4.1/lib/ruby/3.4.0/bundled_gems.rb:82:in 'Kernel.require'
from /app/vendor/ruby-3.4.1/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel#replace_require'
from /app/bin/rails:9:in '<main>'
This may be an issue with IRB. If you believe this is an unexpected behavior, please report it to https://github.com/ruby/irb/issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant