rename singleton_class to single_class and misc
was clashing with real ruby method name also many superclass mismatch fixes some misc
This commit is contained in:
@ -71,7 +71,11 @@ module Ruby
|
||||
end
|
||||
|
||||
def to_s(depth = 0)
|
||||
at_depth(depth , "class #{name}" , @body.to_s(depth + 1) , "end")
|
||||
at_depth(depth , "class #{name} #{super_s}\n#{@body.to_s(depth + 1)}\nend")
|
||||
end
|
||||
# deriviation if apropriate
|
||||
def super_s
|
||||
@super_class_name ? " < #{@super_class_name}" : ""
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -39,7 +39,7 @@ module Ruby
|
||||
|
||||
def to_s(depth = 0)
|
||||
arg_str = @args.collect{|a| a.to_s}.join(', ')
|
||||
at_depth(depth , "def #{name}(#{arg_str})" , @body.to_s(depth + 1) , "end")
|
||||
at_depth(depth , "def #{name}(#{arg_str})\n #{@body.to_s(1)}\nend")
|
||||
end
|
||||
|
||||
end
|
||||
|
Reference in New Issue
Block a user