Autoindentation not working in IRB

Here is my ~/.irbrc file content.

[email protected]:~> cat ~/.irbrc

configure irb

require ‘irb/completion’

IRB.conf[:AUTO_INDENT] = true
IRB.conf[:PROMPT_MODE] = :SIMPLE
[email protected]:~>

=========
IRB indentation before I put the this IRB.conf[:AUTO_INDENT] = true in
my
configuration file :-

[email protected]:~> irb

class Foo
def foo
12
end
end
=> nil

exit

And after I put the settings :-

[email protected]:~> irb

class Foo
def foo
12
end
end
=> nil

exit

You can see indentation working in one direction only. Is there any
other
settings to get the intended behavior ? I found this settings from
official
documentation -
http://www.ruby-doc.org/stdlib-2.0/libdoc/irb/rdoc/IRB.html#module-IRB-label-Auto+indentation

Regards,
Arup R.

Debugging is twice as hard as writing the code in the first place.
Therefore,
if you write the code as cleverly as possible, you are, by definition,
not
smart enough to debug it.

–Brian Kernighan

On Wed, Nov 5, 2014 at 3:37 PM, Arup R.
[email protected] wrote:

You can see indentation working in one direction only.

I don’t think so. It’s just that the “end” is indented on the same
level as the method or class body that it closes.

Is there any other settings to get the intended behavior ?
I found this settings from official
documentation -
http://www.ruby-doc.org/stdlib-2.0/libdoc/irb/rdoc/IRB.html#module-IRB-label-Auto+indentation

Frankly, I don’t know.

Kind regards

robert

El Wednesday 05 November 2014, Arup R. escribi:

You can see indentation working in one direction only. Is there any other
settings to get the intended behavior ? I found this settings from
official documentation -

If by “in one direction” you mean that once you add “end” and press
return the
line is not automatically one level of indentation less, then I guess
you
might be confusing the behaviour from pry’s:

$ irb

def foo
“bar”
end
=> nil

$ pry
[1] pry(main)> def foo
[1] pry(main)* “bar”
[1] pry(main)* end
=> nil
[2] pry(main)>

I didn’t type any indentation in either case. Pry even colorizes the
lines
after you typed them.