Sha256: 117f466bbdc1d72b58d2911710b3185599053b65b98d833c6f969a1a631bcae1

Contents?: true

Size: 622 Bytes

Versions: 2

Compression:

Stored size: 622 Bytes

Contents

require 'opal'
require 'opal-parser'
require 'opal-spec'

# stdlib
require 'opal/date'
require 'opal/enumerator'

module Kernel
  def opal_eval(str)
    code = Opal::Parser.new.parse str
    `eval(code)`
  end

  def opal_parse(str, file='(string)')
    Opal::Grammar.new.parse str, file
  end

  def opal_eval_compiled(javascript)
    `eval(javascript)`
  end

  # Used for splitting specific ruby version tests. For now we allow all test
  # groups to run (as opal isnt really a specific ruby version as such?)
  def ruby_version_is(version, &block)
    block.call
  end

  def enumerator_class
    Enumerator
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
opal-0.3.41 spec/spec_helper.rb
opal-0.3.40 spec/spec_helper.rb