Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
21 lines (15 sloc) 383 Bytes
#include "builtin/string.hpp"
#include "capi/capi.hpp"
using namespace rubinius;
using namespace rubinius::capi;
namespace rubinius {
namespace capi {
}
}
extern "C" {
VALUE rb_id2str(ID sym) {
NativeMethodEnvironment* env = NativeMethodEnvironment::get();
String* str = reinterpret_cast<Symbol*>(sym)->to_str(env->state());
return env->get_handle(str);
}
}
Something went wrong with that request. Please try again.