1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00

map js(undefined) -> ruby(nil)

This commit is contained in:
Charles Lowell 2009-10-16 15:27:39 -05:00
parent 693a42b5d4
commit 5a45899135
2 changed files with 5 additions and 2 deletions

View file

@ -13,7 +13,6 @@ describe "The Ruby Racer" do
end
it "passes back undefined value as nil" do
pending "This currently causes a segmentation fault..."
eval("this.undefined").should be_nil
end

View file

@ -18,10 +18,14 @@ template<class T, class R> class V8HandleSource {
R push(v8::Handle<v8::Value>& value, const char* name = 0) {
if(value->IsNull()) {
if (value->IsUndefined()) {
return dest.pushNull(name);
}
if(value->IsNull()) {
return dest.pushNull(name);
}
if(value->IsTrue()) {
return dest.pushBool(true, name);
}