This repository was archived by the owner on Dec 4, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33namespace rr {
44
5- VALUE Value::Empty;
6-
75 void Value::Init () {
8- Empty = rb_eval_string (" Object.new" );
9-
106 ClassBuilder (" Value" ).
11- defineConst (" Empty" , Empty).
12-
137 defineMethod (" IsUndefined" , &IsUndefined).
148 defineMethod (" IsNull" , &IsNull).
159 defineMethod (" IsTrue" , &IsTrue).
@@ -44,8 +38,6 @@ namespace rr {
4438 defineSingletonMethod (" FromRubyObject" , &FromRubyObject).
4539
4640 store (&Class);
47-
48- rb_gc_register_address (&Empty);
4941 }
5042
5143 VALUE Value::IsUndefined (VALUE self) {
@@ -209,10 +201,6 @@ namespace rr {
209201 }
210202
211203 v8::Handle<v8::Value> Value::rubyObjectToHandle (v8::Isolate* isolate, VALUE value) {
212- if (rb_equal (value, Empty)) {
213- return v8::Handle<v8::Value>();
214- }
215-
216204 switch (TYPE (value)) {
217205 case T_FIXNUM:
218206 return v8::Integer::New (isolate, NUM2INT (value));
Original file line number Diff line number Diff line change @@ -66,8 +66,6 @@ namespace rr {
6666 static v8::Handle<v8::Value> rubyObjectToHandle (v8::Isolate* isolate, VALUE value);
6767
6868 static std::vector< v8::Handle<v8::Value> > convertRubyArray (v8::Isolate* isolate, VALUE value);
69-
70- static VALUE Empty;
7169 };
7270
7371}
You can’t perform that action at this time.
0 commit comments