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.5.13 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.5.12 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.5.11 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.5.10 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.5.9 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.5.8 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.5.7 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
therubyracer-0.10.2 spec/ext/ext_spec_helper.rb
therubyracer-0.10.2beta1 spec/ext/ext_spec_helper.rb
classiccms-0.5.6 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.5.5 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.5.2 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.5.1 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.5.0 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.4.2 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.4.1 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.4.0 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.3.9 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb