revert to symbols
Parfait::Words were nice, but endless problems with the fact that when you write “String” you get a string. Symbols take care of uniqueness at the same time
This commit is contained in:
@ -56,14 +56,14 @@ module Parfait
|
||||
end
|
||||
|
||||
def get_main
|
||||
kernel = get_class_by_name "Object"
|
||||
kernel.get_instance_method "main"
|
||||
kernel = get_class_by_name :Object
|
||||
kernel.get_instance_method :main
|
||||
end
|
||||
|
||||
# this is the way to instantiate classes (not Parfait::Class.new)
|
||||
# so we get and keep exactly one per name
|
||||
def get_class_by_name name
|
||||
raise "uups #{name}.#{name.class}" unless name.is_a?(Word) or name.is_a?(String)
|
||||
raise "uups #{name}.#{name.class}" unless name.is_a?(Symbol)
|
||||
c = @classes[name]
|
||||
puts "MISS, no class #{name} #{name.class}" unless c # " #{@classes}"
|
||||
c
|
||||
|
Reference in New Issue
Block a user