This pull requests normalizes value handling in two ways. First, gets rid of the special cases for Undefined and Null which are actually represented as objects inside v8, so should be represented as objects in our C layer. (we should also add at some point impmente V8::C::V8::Undefined(@isolate) and V8::C::V8::Null(@isolate) in order to retreive those values explicitly)
Second, it makes the normal Value::operator VALUE() perform the thunk-down on type so that when returning a v8::Value to Ruby, there's nothing more to do than use the normal Value(isolate, handle) constructor to get the most specific Ruby class.
This pull requests normalizes value handling in two ways. First, gets rid of the special cases for
Undefined
andNull
which are actually represented as objects inside v8, so should be represented as objects in our C layer. (we should also add at some point impmenteV8::C::V8::Undefined(@isolate)
andV8::C::V8::Null(@isolate)
in order to retreive those values explicitly)Second, it makes the normal
Value::operator VALUE()
perform the thunk-down on type so that when returning av8::Value
to Ruby, there's nothing more to do than use the normalValue(isolate, handle)
constructor to get the most specific Ruby class.