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

interim solution for making class methods available as methods on the reflected javascript constructor.

This commit is contained in:
Charles Lowell 2010-08-28 15:41:00 -05:00
parent e5bdf2b410
commit 5354bb7370

View file

@ -93,6 +93,11 @@ module V8
when ::Class
@constructors[value].GetFunction().tap do |f|
f.SetHiddenValue(C::String::NewSymbol("TheRubyRacer::RubyObject"), C::External::New(value))
#set the function's prototype object to the object that will have the named property handlers
prototype = rubytemplate.NewInstance()
#set *that* object's prototype to an empty function so that it will look and behave like a function.
prototype.SetPrototype(C::FunctionTemplate::New() {}.GetFunction())
f.SetPrototype(prototype)
end
when nil,Numeric,TrueClass,FalseClass, C::Value
value