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:
parent
e5bdf2b410
commit
5354bb7370
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue