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

Can't execute multiple line statement #1033

Closed
obregonia1 opened this issue Nov 10, 2023 · 3 comments
Closed

Can't execute multiple line statement #1033

obregonia1 opened this issue Nov 10, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@obregonia1
Copy link

I can't execute like below code.

(ruby) 3.times do |i|
eval error: (rdbg)/test.rb:1: syntax error, unexpected end-of-input
3.times do |i|
              ^

But, this works.

(ruby) 3.times do |i|;i *= 10; p i;end
0
10
20
3

I created this issue because it worked in irb and I thought this behavior was useful.

@ko1 ko1 added the enhancement New feature or request label Nov 14, 2023
@maxp-hover
Copy link

This is a serious shortcoming of the tool. Seconding that the tool would vastly benefit from this

@st0012
Copy link
Member

st0012 commented Dec 21, 2023

With version 1.9.0 it now supports using IRB as the console, which supports multi-line input (among other features). You can activate it by setting env var: RUBY_DEBUG_IRB_CONSOLE=1.

@obregonia1
Copy link
Author

@st0012
Thanks!! This issue has resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

4 participants