1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00
therubyracer/spec/c/handles_spec.rb
Georgy Angelov d1e9088cf0 Port a ton of the original ext classes
You can now create a JS object from Ruby-land without segfaulting
2015-03-20 20:47:57 +00:00

22 lines
491 B
Ruby

require 'c_spec_helper'
describe 'handles' do
describe '#HandleScope' do
let(:isolate) { V8::C::Isolate.New }
it 'can allocate handle scopes' do
V8::C::HandleScope(isolate) do
end
end
it 'isn\'t the end of the world if a ruby exception is raised inside a HandleScope' do
begin
V8::C::HandleScope(isolate) do
raise 'boom!'
end
rescue StandardError => e
expect(e.message).to eq 'boom!'
end
end
end
end