minor
This commit is contained in:
parent
3c0022191b
commit
47abdffd1a
@ -46,7 +46,7 @@ module Virtual
|
|||||||
method_name = Virtual.new_word(method_name) if method_name.is_a? String
|
method_name = Virtual.new_word(method_name) if method_name.is_a? String
|
||||||
clazz = Machine.instance.space.get_class_by_name class_name
|
clazz = Machine.instance.space.get_class_by_name class_name
|
||||||
raise "No such class #{class_name}" unless clazz
|
raise "No such class #{class_name}" unless clazz
|
||||||
method = clazz.create_instance_method(method_name , Virtual.new_list(args))
|
method = clazz.create_instance_method( method_name , Virtual.new_list(args))
|
||||||
method.info = CompiledMethodInfo.new
|
method.info = CompiledMethodInfo.new
|
||||||
method
|
method
|
||||||
end
|
end
|
||||||
|
@ -45,7 +45,7 @@ module Virtual
|
|||||||
# otherwise it's a method without args and a send is issued.
|
# otherwise it's a method without args and a send is issued.
|
||||||
# whichever way this goes the result is stored in the return slot (as all compiles)
|
# whichever way this goes the result is stored in the return slot (as all compiles)
|
||||||
def self.compile_name expression , method
|
def self.compile_name expression , method
|
||||||
return Self.new( Mystery ) if expression.name == :self
|
return Self.new( Reference.new(method.for_class)) if expression.name == :self
|
||||||
name = Virtual.new_word expression.name.to_s
|
name = Virtual.new_word expression.name.to_s
|
||||||
if method.has_var(name)
|
if method.has_var(name)
|
||||||
# either an argument, so it's stored in message
|
# either an argument, so it's stored in message
|
||||||
|
@ -25,7 +25,7 @@ HERE
|
|||||||
def test_puts_string
|
def test_puts_string
|
||||||
@string_input = <<HERE
|
@string_input = <<HERE
|
||||||
def foo()
|
def foo()
|
||||||
puts("Hello")
|
putstring("Hello")
|
||||||
end
|
end
|
||||||
foo()
|
foo()
|
||||||
HERE
|
HERE
|
||||||
|
Loading…
Reference in New Issue
Block a user