ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> ruby-talk
ruby-talk
Re: Differences between irb and ruby.
by Mauricio Fernandez other posts by this author
Jul 1 2006 4:15AM messages near this date
Re: Differences between irb and ruby. | Problem with gems, Windows, C extension
On Sat, Jul 01, 2006 at 01:32:54PM +0900, Logan Capaldo wrote:
>  >What do you mean by 'evaled' and 'complete state'? And Why are the
>  >visibility differences happening?
>  
>  irb is a repl written in ruby which means it uses eval (or  
>  module_eval or instance_eval). [...]

As for "complete state": irb needs a full ("complete") expression before it
can run eval(str). It is intelligent enough to keep reading until the
expression can be eval'ed, e.g. if you enter 
  class Foo
it will ask for input until it sees a matching 'end'.
Note that irb's lexer is not perfect so this might fail occasionally.

-- 
Mauricio Fernandez  -   http://eigenclass.org   -  singular Ruby
Thread:
Minkoo Seo
Ezra Zygmuntowicz
Minkoo Seo
Ezra Zygmuntowicz
Austin Ziegler
Minkoo Seo
Logan Capaldo
Mauricio Fernandez

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved