Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fake cext rb_sourcefile(), rb_sourceline(), ruby_sourcefile. Fixes #467.

  • Loading branch information...
commit 48318834758ea61708e81da05b1b148e296ee9c0 1 parent b95700d
Wayne Meissner authored
Showing with 18 additions and 0 deletions.
  1. +4 −0 cext/src/include/ruby/ruby.h
  2. +14 −0 cext/src/ruby.cpp
View
4 cext/src/include/ruby/ruby.h
@@ -1181,6 +1181,10 @@ RUBY_DLLSPEC extern VALUE rb_eLoadError;
RUBY_DLLSPEC VALUE ruby_verbose(void);
RUBY_DLLSPEC VALUE ruby_debug(void);
+RUBY_DLLSPEC extern const char* ruby_sourcefile;
+RUBY_DLLSPEC const char *rb_sourcefile(void);
+RUBY_DLLSPEC int rb_sourceline(void);
+
// TODO: get rjb to use a different #ifdef than "RUBINIUS"
// #define RUBINIUS 1
#define HAVE_RB_ERRINFO 1
View
14 cext/src/ruby.cpp
@@ -250,6 +250,20 @@ ruby_debug(void)
return rb_gv_get("$DEBUG");
}
+const char* ruby_sourcefile = "unknown";
+
+RUBY_DLLSPEC const char *
+rb_sourcefile(void)
+{
+ return "unknown";
+}
+
+RUBY_DLLSPEC int
+rb_sourceline(void)
+{
+ return -1;
+}
+
#define M(x) rb_m##x = getConstModule(env, #x)
#define C(x) rb_c##x = getConstClass(env, #x)
#define E(x) rb_e##x = getConstClass(env, #x)
Please sign in to comment.
Something went wrong with that request. Please try again.