Skip to content
This repository has been archived by the owner on Apr 12, 2019. It is now read-only.

Commit

Permalink
Fake self? Really?
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony Arcieri committed Dec 25, 2010
1 parent 3bf8a84 commit fcf88bf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/builtins/module.re
Expand Up @@ -8,8 +8,8 @@
module Module
def class; Module; end

def call(fake_self, :to_s, args, block)
(:reia_module, name) = fake_self
def call(receiver, :to_s, args, block)
(:reia_module, name) = receiver
case erl.code.ensure_loaded(name)
when (:module, name)
name.to_string()
Expand All @@ -19,12 +19,12 @@ module Module
end
end

def call(fake_self, :inspect, args, block)
fake_self.to_s()
def call(receiver, :inspect, args, block)
receiver.to_s()
end

def call(fake_self, method, args, block)
(:reia_module, name) = fake_self
def call(receiver, method, args, block)
(:reia_module, name) = receiver
erl.apply(name, method, [args, block])
end
end

0 comments on commit fcf88bf

Please sign in to comment.