Sha256: 0c3a9ba1eaf57c1ffd55811a9f0599a8865d47986e6490f39ed040b673e37abe

Contents?: true

Size: 445 Bytes

Versions: 65

Compression:

Stored size: 445 Bytes

Contents

module V8::ExtSpec

  def self.included(object)
    object.class_eval do
      before do
        @lock = c::Locker.new
        @cxt = c::Context::New()
        @cxt.Enter()
      end
      after do
        @cxt.Exit()
        @cxt.Dispose()
        @lock.delete
      end
    end
  end

  def v8_eval(script, sourcename = "<eval>")
    c::Script::New(c::String::New(script), c::String::New(sourcename)).Run()
  end

  def c
    V8::C
  end

end

Version data entries

65 entries across 65 versions & 5 rubygems

Version Path
classiccms-0.7.5 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.7.4 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.7.3 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.7.2 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.7.1 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.7.0 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.6.9 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.6.8 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.6.7 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.6.6 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.6.5 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.6.4 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.6.3 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.6.2 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.6.1 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.6.0 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.5.17 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.5.16 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.5.15 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.5.14 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb