0

I noticed a weird thing. I accidentally typed:

@a = n

which led to exit of rails console.

On further experimenting I found out even if I just do (in console)

n

The console exits. If I try any other character, I get error as expected.

a
# => NameError: undefined local variable or method `a' for main:Object

I was not able to find any documentaion that stated n is used to exit rails console. Is this normal? Or my console is breaking cause of some thing that I dont understand at all?

Versions:

ruby 1.8.7 (2012-06-29 patchlevel 370) [x86_64-linux]
Rails 3.2.13
shivam
  • 16,048
  • 3
  • 56
  • 71

2 Answers2

5

This is a known issue in debugger. Go through here https://github.com/cldwalker/debugger/issues/133 . This is also with pry https://github.com/nixme/pry-debugger/issues/55 .

Dipak Gupta
  • 7,321
  • 1
  • 20
  • 32
0

Well, works as expected (undefined local ...) for me at least. Ruby 1.9.3

Consider reinstalling ruby, maybe? :)

Dmitri
  • 2,451
  • 6
  • 35
  • 55