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
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.3.8 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
therubyracer-freebsd-0.10.1 spec/ext/ext_spec_helper.rb
classiccms-0.3.7 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.3.6 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.3.5 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.3.4 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.3.3 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.3.2 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
classiccms-0.3.1 vendor/bundle/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
horseman-0.0.5 vendor/ruby/1.9.1/gems/therubyracer-0.10.1/spec/ext/ext_spec_helper.rb
therubyracer-0.10.1 spec/ext/ext_spec_helper.rb
therubyracer-0.10.0 spec/ext/ext_spec_helper.rb
therubyracer-0.9.10 spec/ext/ext_spec_helper.rb
therubyracer-0.9.9 spec/ext/ext_spec_helper.rb
therubyracer-0.9.8 spec/ext/ext_spec_helper.rb
therubyracer-0.10.0beta1 spec/ext/ext_spec_helper.rb
therubyracer-0.9.7 spec/ext/ext_spec_helper.rb