Pry: A better Ruby REPL
rdoc.info
rdoc.info
People should know Pry is relatively new. We're actively writing code daily to improve it. We have some pretty awesome items on the TODO list, so keep an eye on it!
To answer an FAQ: There's no reason not to replace IRB with Pry, or at least extend IRB with Pry inside of your ~/.irbrc
Unless of course you mean history through different sessions as that doesn't work for full functions.
Idle is a bit easier to edit the function though.
If you want to try this out, simply `gem install ripl ripl-multi_line` and add the gist to ~/.riplrc. Since this is a hack, I would open an issue on https://github.com/janlelis/ripl-multi_line/issues if you want it to be done properly.
If you were talking about using readline's multi-line history, I'm not sure if ruby's readline library has an api to it. Would be useful.
You can change the behavior with the Ripl.config[:multi_line_history] option. Possible values: * :compact - transform the last statement into a ; separated one-liner * :block - just join the last multi-line statement to one block ("\n") * :blank - do nothing
So this looks less like a REPL than a gdb-like interactive debugging tool. But unless it can be used for attaching to and inspecting live running processes, it doesn't seem all that useful.
Also, Pry is currently weighing in at less than 2 thousand lines. It's not going the way IRB is going, but it is indeed very feature full, and probably will contain stuff you may not use every day. It's also easy to extend, so moving commands out of core and abstracting them into their own external libraries would be simple, would we ever want/need to slim the library.
I guess you're referring to lines of code. But if we're talking about that then you're actually pretty close to the original irb in size.
"It's also easy to extend, so moving commands out of core and abstracting them into their own external libraries would be simple"
Moving code around is simple yet pry's current extendability and abstraction is all of one plugin