Autoindentation not working in IRB

Here is my ~/.irbrc file content.

arup@linux-wzza:~> cat ~/.irbrc
# configure irb
require 'irb/completion'

IRB.conf[:AUTO_INDENT] = true
IRB.conf[:PROMPT_MODE] = :SIMPLE
arup@linux-wzza:~>

···

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

arup@linux-wzza:~> irb

class Foo
def foo
12
end
end

=> nil

exit

And after I put the settings :-

arup@linux-wzza:~> 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 - Module: IRB (Ruby 2.0.0)
..

--

Regards,
Arup Rakshit

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

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 - Module: IRB (Ruby 2.0.0)
..

Frankly, I don't know.

Kind regards

robert

···

On Wed, Nov 5, 2014 at 3:37 PM, Arup Rakshit <aruprakshit@rocketmail.com> wrote:

--
[guy, jim].each {|him| remember.him do |as, often| as.you_can - without end}
http://blog.rubybestpractices.com/

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.

···

El Wednesday 05 November 2014, Arup Rakshit escribió:

--
Alex (a.k.a. suy) | GPG ID 0x0B8B0BC2
http://barnacity.net/ | http://disperso.net