Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Upgrading to rbx 2.0, fixing some compiler failures.

  • Loading branch information...
commit 306c9906e683607fa6a128e2a11be018f69f1f4f 1 parent 1ccaf5a
@vic authored
View
2  lib/typhon/ast/nodes.rb
@@ -35,7 +35,7 @@ def self.node(name, *attributes)
names = ['line'] + attributes
attrs = names.map { |a| '@' + a }
- cls.attr_accessor *names
+ cls.send :attr_accessor, *names
cls.module_eval <<-INIT
def initialize(#{names.join(', ')})
#{attrs.join(', ')} = #{names.join(', ')}
View
4 lib/typhon/ast/nodes/function.rb
@@ -31,6 +31,10 @@ def default_names
[]
end
end
+
+ def post_args
+ 0
+ end
end
class ModuleArguments < Arguments
View
2  lib/typhon/environment/exceptions.rb
@@ -66,7 +66,7 @@ def self.make_exception(name, base, doc)
c.py_cache[:derived_exception] = k
# add tell the ruby class what python class it's from.
- k.metaclass.send(:define_method, :factory) { c }
+ k.singleton_class.send(:define_method, :factory) { c }
ExceptionsModule.py_set(name, c)
BuiltInModule.py_set(name, c)
View
2  lib/typhon/environment/function.rb
@@ -8,7 +8,7 @@ def invoke(cm = nil, scope = nil, &block)
if cm
Rubinius.attach_method(:invoke, cm, scope, self)
else
- metaclass.send(:define_method, :invoke, &block)
+ singleton_class.send(:define_method, :invoke, &block)
end
end
end
View
1  lib/typhon/environment/type.rb
@@ -2,6 +2,7 @@
module Typhon
module Environment
+ Type = Rubinius::Type
# We need to do some magic to make these two things refer to each
# other in the right way. Type is an ObjectBase of type Type, which has
# several recursive relationships. So we define ObjectBase first,
Please sign in to comment.
Something went wrong with that request. Please try again.