Created
October 27, 2008 15:31
-
-
Save nrk/20118 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\ironruby\bin>ir | |
IronRuby 1.0.0.0 on .NET 2.0.50727.1433 | |
Copyright (c) Microsoft Corporation. All rights reserved. | |
Note that local variables do not work today in the console. | |
As a workaround, use globals instead (eg $x = 42 instead of x = 42). | |
>>> ENV['GEM_PATH'] = 'C:\\Programmi\\Ruby\\lib\\ruby\\gems\\1.8\\' | |
=> "C:\\Programmi\\Ruby\\lib\\ruby\\gems\\1.8\\" | |
>>> require 'rubygems' | |
=> true | |
>>> require 'ruby_parser' | |
=> true | |
>>> @processor = RubyParser.new | |
=> #<RubyParser:0x00008f6 @lexer=#<RubyLexer:0x00008f2 @cond=StackState(cond, [false]), | |
@cmdarg=StackState(cmdarg, [false]), @nest=0, @comments=[], @command_start=true, @lex_strterm=nil, | |
@token=nil, @yacc_value=nil, @src=nil, @lex_state=nil, @parser=...>, @env=#<Environment:0x00008f8 | |
@dyn=[false], @env=[{}], @use=[{}]>, @comments=[], @in_def=false, @in_single=0> | |
>>> @processor.parse('a = 42') | |
=> s(:lasgn, :a, s(:lit, 42)) | |
>>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment