Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

45 lines (35 sloc) 1.271 kb
#include "dispatch.hpp"
#include "arguments.hpp"
#include "lookup_data.hpp"
#include "global_cache.hpp"
#include "builtin/module.hpp"
#include "builtin/class.hpp"
#include "builtin/symbol.hpp"
#include "builtin/executable.hpp"
namespace rubinius {
Object* Dispatch::send(STATE, CallFrame* call_frame, Arguments& args,
MethodMissingReason reason)
{
LookupData lookup(args.recv(), args.recv()->lookup_begin(state), G(sym_protected));
return send(state, call_frame, lookup, args, reason);
}
Object* Dispatch::send(STATE, CallFrame* call_frame, LookupData& lookup,
Arguments& args, MethodMissingReason reason)
{
Symbol* original_name = name;
if(!GlobalCache::resolve(state, name, *this, lookup)) {
state->vm()->set_method_missing_reason(reason);
method_missing = true;
lookup.min_visibility = G(sym_private);
if(!GlobalCache::resolve(state, G(sym_method_missing), *this, lookup)) {
Exception::internal_error(state, call_frame, "no method_missing");
return 0;
}
method_missing = true;
}
if(method_missing) {
args.unshift(state, original_name);
}
return method->execute(state, call_frame, method, module, args);
}
}
Jump to Line
Something went wrong with that request. Please try again.