mirror of
https://github.com/rubyjs/therubyracer
synced 2023-03-27 23:21:42 -04:00
dynamically looking up singleton methods on ruby classes that are reflected as constructors.
This commit is contained in:
parent
1baf15a9ba
commit
c1f6918520
2 changed files with 6 additions and 1 deletions
|
@ -50,6 +50,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 = Access.rubyobject.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
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit baabf41cdcc1f19ddc2cdf392b92e836989b0ad7
|
||||
Subproject commit f21d420e069f13d645750c35d859b12d18c10ce4
|
Loading…
Add table
Reference in a new issue