summaryrefslogtreecommitdiffstats
path: root/lib/kross/ruby/rubyinterpreter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kross/ruby/rubyinterpreter.cpp')
-rw-r--r--lib/kross/ruby/rubyinterpreter.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/kross/ruby/rubyinterpreter.cpp b/lib/kross/ruby/rubyinterpreter.cpp
index 6af8ecbe7..e2c4022ad 100644
--- a/lib/kross/ruby/rubyinterpreter.cpp
+++ b/lib/kross/ruby/rubyinterpreter.cpp
@@ -66,6 +66,7 @@ typedef mStrVALUE::iterator mStrVALUE_it;
typedef mStrVALUE::const_iterator mStrVALUE_cit;
class RubyInterpreterPrivate {
friend class RubyInterpreter;
+ static VALUE s_krossModule;
};
RubyInterpreterPrivate* RubyInterpreter::d = 0;
@@ -107,6 +108,15 @@ void RubyInterpreter::initRuby()
rb_define_global_function("require", (VALUE (*)(...))RubyInterpreter::require, 1);
}
+VALUE RubyInterpreter::krossModule()
+{
+ if(RubyInterpreterPrivate::s_krossModule == 0)
+ {
+ RubyInterpreterPrivate::s_krossModule = rb_define_module("Kross");
+ }
+ return RubyInterpreterPrivate::s_krossModule;
+}
+
void RubyInterpreter::finalizeRuby()
{
delete d;