Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added wrapper for string_new.

  • Loading branch information...
commit ebe8d450e71e80c42d22ac881fe58adb3217a959 1 parent b60414c
@whitequark authored
Showing with 9 additions and 2 deletions.
  1. +6 −1 libcoldruby/ColdRuby.cpp
  2. +3 −1 libcoldruby/ColdRuby.h
View
7 libcoldruby/ColdRuby.cpp
@@ -468,6 +468,11 @@ Local<Object> ColdRuby::to_block(Handle<Object> value) {
RETURN_CHECK_TYPE(to_block, Object);
}
-void ColdRuby::rubyDisposed(v8::Persistent<v8::Value> object, void *arg) {
+Local<Object> ColdRuby::string_new(Handle<String> value) {
+ DO_RUBY_CALL(string_new, 1, value);
+ RETURN_CHECK_TYPE(string_new, Object);
+}
+
+void ColdRuby::rubyDisposed(v8::Persistent<v8::Value> object, void *arg) {
delete static_cast<ColdRuby *>(arg);
}
View
4 libcoldruby/ColdRuby.h
@@ -114,9 +114,11 @@ class ColdRuby {
v8::Local<v8::Object> to_float(v8::Handle<v8::Object> value);
v8::Local<v8::Object> to_block(v8::Handle<v8::Object> value);
+ v8::Local<v8::Object> string_new(v8::Handle<v8::String> value);
+
private:
static void rubyDisposed(v8::Persistent<v8::Value> object, void *arg);
-
+
void setErrorString(const std::string &string);
ColdRubyVM *m_vm;
Please sign in to comment.
Something went wrong with that request. Please try again.