Prepare for older rbx on travis

This commit is contained in:
Markus Schirp 2012-08-20 05:01:26 +02:00
parent d07b8e2420
commit 14b7efadc9

View file

@ -25,17 +25,30 @@ module Mutant
# #
def initialize(root) def initialize(root)
@root = Helper.deep_clone(root) @root = Helper.deep_clone(root)
Rubinius.run_script(script.compiled_code) Rubinius.run_script(compiled_code)
end
# Return compiled code
#
# @return [Rubinius::CompiledCode]
#
# @api private
#
# FIXME: rbx on travis is older than on my devbox.
#
def compiled_code
_script = script
_script.respond_to?(:compiled_code) ? _script.compiled_code : _script.compiled_method
end end
# Return code script # Return code script
# #
# @return [Rubinisu::CompiledCode::Script] # @return [Rubinius::CompiledCode::Script]
# #
# @api private # @api private
# #
def script def script
compiled_code.create_script compiled_code_raw.create_script
end end
# Return compiled code for node # Return compiled code for node
@ -44,7 +57,7 @@ module Mutant
# #
# @api private # @api private
# #
def compiled_code def compiled_code_raw
compiler.run compiler.run
end end