Re: What is the difference between ir and iirb?

Iirb is actually a library and has more features.

Iirb:

  • can set the prompt in a .irbrc file
  • can be nested (you can start a new irb session from within irb, even
    giving it a new target object to use as self)
  • as a library, irb can be incorporated into other projects

Irb is the REPL for MRI, it just happens that the current design of the
DLR gives a REPL pretty easily, so ir.exe is also a REPL.

JD


From: Shay F. [email protected]
Sent: October 09, 2009 1:54 AM
To: [email protected] [email protected]
Subject: [Ironruby-core] What is the difference between ir and iirb?

When no arguments are passed, they both start a REPL console only that
iirb shows the time of each operation. Are there more differences?

Thanks,
Shay.

IRB actually doesn’t show the time by default, it shows what “self” is,
along with the line number and nested line number. Also, ir.exe’s REPL
does not set the TOPLEVEL_BINDING constant, though running a file or a
snippet with ir.exe does:

$>ir.exe
IronRuby 0.9.1.0 on .NET 2.0.50727.4927
Copyright © Microsoft Corporation. All rights reserved.

TOPLEVEL_BINDING
c:\dev\vsl1s\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTRICTED\Builtins\ModuleOps.cs:805:in
`const
_missing’: uninitialized constant Object::TOPLEVEL_BINDING (NameError)
from :0

$>iirb
irb(main):001:0> TOPLEVEL_BINDING
=> IronRuby.Builtins.Binding

$>ruby -e “puts TOPLEVEL_BINDING”
#Binding:0x3030acc

$>rbd -e “puts TOPLEVEL_BINDING”
IronRuby.Builtins.Binding

From: [email protected]
[mailto:[email protected]] On Behalf Of Jim D.
Sent: Friday, October 09, 2009 7:05 AM
To: [email protected]
Subject: Re: [Ironruby-core] What is the difference between ir and iirb?

Iirb is actually a library and has more features.

Iirb:

  • can set the prompt in a .irbrc file
  • can be nested (you can start a new irb session from within irb, even
    giving it a new target object to use as self)
  • as a library, irb can be incorporated into other projects

Irb is the REPL for MRI, it just happens that the current design of the
DLR gives a REPL pretty easily, so ir.exe is also a REPL.

JD


From: Shay F. [email protected]
Sent: October 09, 2009 1:54 AM
To: [email protected] [email protected]
Subject: [Ironruby-core] What is the difference between ir and iirb?
When no arguments are passed, they both start a REPL console only that
iirb shows the time of each operation. Are there more differences?

Thanks,
Shay.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs