Skip to content

Commit

Permalink
add alias $PROGRAM_NAME to $0.
Browse files Browse the repository at this point in the history
  • Loading branch information
sbryant committed Apr 6, 2010
1 parent 73a8d3c commit f98863a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kernel/delta/kernel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ def method_missing(meth, *args)
get = proc { Rubinius.kcode.to_s }
set = proc { |key, val| Rubinius.kcode = val }
Rubinius::Globals.set_hook(:$KCODE, get, set)

# Alias $0 $PROGRAM_NAME
Rubinius::Globals.add_alias(:$0, :$PROGRAM_NAME)

# Implements rb_path2name. Based on code from wycats
def const_lookup(name)
Expand Down

0 comments on commit f98863a

Please sign in to comment.