Skip to content

Commit

Permalink
Rename _main_ to $main.
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Dec 11, 2012
1 parent 9b670ec commit d325542
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/ruby/fast_ruby/class_compiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def define_main

body = ast.new_block
main_call = ast.new_method_invocation
main_call.name = ast.new_simple_name("_main_")
main_call.name = ast.new_simple_name("$main")
new_obj = ast.new_class_instance_creation
new_obj.type = ast.new_simple_type(ast.new_simple_name(@class_name))
main_call.expression = new_obj
Expand Down
2 changes: 1 addition & 1 deletion src/main/ruby/fast_ruby/method_compiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def start
when org.jruby.ast.RootNode
# no name; it's the main body of a script
ruby_method = ast.new_method_declaration
ruby_method.name = ast.new_simple_name "_main_"
ruby_method.name = ast.new_simple_name "$main"

body_node = node
when org.jruby.ast.ClassNode
Expand Down

0 comments on commit d325542

Please sign in to comment.