Sha256: e4ccd3debc05db789b6ea8f1e0b52ffaffda01ccd0ff73ac573ed1750ee2aaf9
Contents?: true
Size: 707 Bytes
Versions: 2
Compression:
Stored size: 707 Bytes
Contents
/* Ruby 1.9.3 doesn't need a C extension while 1.9.2 does. I can't figure out a way build a gem so that it loads the C extension conditionally. So instead we have a simple stupid stub extension. This as it is not elegant. */ #include <ruby.h> #include <ruby/version.h> #include <string.h> void Init_trace(void) { if (0 == strncmp("1.9.2", ruby_version, sizeof("1.9.2"))) { rb_raise(rb_eLoadError, "Gem installed under Ruby 1.9.3 but this Ruby 1.9.2. Please reinstall 'rb-trace' gem under 1.9.2."); } else if (0 == strncmp("1.9.3", ruby_version, sizeof("1.9.3"))) { rb_raise(rb_eLoadError, "Under Ruby 1.9.3 there is no reason to load this trace C extension."); } }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rb-trace-0.7 | ext/1.9.3/trace.c |
rb-trace-0.6 | ext/1.9.3/trace.c |