Browse files

cleanup

  • Loading branch information...
1 parent c52b94a commit 1b6d008120eb0b0526f5dd73fb01fd1b5a1f5a42 @clojure-site clojure-site committed Sep 12, 2009
View
237 ext/java/src/CallsiteHook.java
@@ -10,129 +10,128 @@
import org.jruby.runtime.builtin.IRubyObject;
public class CallsiteHook extends RcovHook {
+
+ private static CallsiteHook callsiteHook;
- private static CallsiteHook callsiteHook;
-
- public static CallsiteHook getCallsiteHook() {
- if (callsiteHook == null) {
- callsiteHook = new CallsiteHook();
- }
- return callsiteHook;
- }
-
- private boolean active;
- private RubyHash defsites;
- private RubyHash callsites;
-
- private CallsiteHook() {
- super();
- }
-
- public boolean isActive() {
- return active;
- }
-
- public boolean isInterestedInEvent(RubyEvent event) {
- return event == RubyEvent.CALL || event == RubyEvent.C_CALL;
- }
-
- public RubyArray getCallsiteInfo(Ruby runtime) {
- RubyArray info = runtime.newArray();
- info.add(getCallsites(runtime));
- info.add(getDefsites(runtime));
- return info;
- }
-
- public void setActive(boolean active) {
- this.active = active;
- }
-
- public RubyHash resetDefsites() {
- defsites.clear();
- return defsites;
+ public static CallsiteHook getCallsiteHook() {
+ if (callsiteHook == null) {
+ callsiteHook = new CallsiteHook();
}
-
- public void eventHandler(ThreadContext context, String event, String file, int line,
- String name, IRubyObject type) {
- RubyArray currentMethod = context.getRuntime().newArray();
- currentMethod.add(context.getFrameKlazz());
- currentMethod.add(context.getRuntime().newSymbol(name));
-
- RubyArray fileLoc = context.getRuntime().newArray();
- fileLoc.add(file);
- fileLoc.add(Long.valueOf(line));
- defsites = getDefsites(context.getRuntime());
- if (!context.isWithinTrace()) {
- context.setWithinTrace(true);
-
- defsites.put(currentMethod, fileLoc);
-
- callsites = getCallsites(context.getRuntime());
- if (!callsites.containsKey(currentMethod)) {
- callsites.put(currentMethod, RubyHash.newHash(context.getRuntime()));
- }
- RubyHash hash = (RubyHash) callsites.get(currentMethod);
-
- RubyArray callerArray = customBacktrace(context);
- if (!hash.containsKey(callerArray)) {
- hash.put(callerArray, Long.valueOf(0));
- }
- Long count = (Long) hash.get(callerArray);
- long itCount = count.longValue() + 1L;
- hash.put(callerArray, Long.valueOf(itCount));
- context.setWithinTrace(false);
- }
-
+ return callsiteHook;
+ }
+
+ private boolean active;
+ private RubyHash defsites;
+ private RubyHash callsites;
+
+ private CallsiteHook() {
+ super();
+ }
+
+ public boolean isActive() {
+ return active;
+ }
+
+ public boolean isInterestedInEvent(RubyEvent event) {
+ return event == RubyEvent.CALL || event == RubyEvent.C_CALL;
+ }
+
+ public RubyArray getCallsiteInfo(Ruby runtime) {
+ RubyArray info = runtime.newArray();
+ info.add(getCallsites(runtime));
+ info.add(getDefsites(runtime));
+ return info;
+ }
+
+ public void setActive(boolean active) {
+ this.active = active;
+ }
+
+ public RubyHash resetDefsites() {
+ defsites.clear();
+ return defsites;
+ }
+
+ public void eventHandler(ThreadContext context, String event, String file, int line, String name, IRubyObject type) {
+ RubyArray currentMethod = context.getRuntime().newArray();
+ currentMethod.add(context.getFrameKlazz());
+ currentMethod.add(context.getRuntime().newSymbol(name));
+
+ RubyArray fileLoc = context.getRuntime().newArray();
+ fileLoc.add(file);
+ fileLoc.add(Long.valueOf(line));
+ defsites = getDefsites(context.getRuntime());
+
+ if (!context.isWithinTrace()) {
+ context.setWithinTrace(true);
+ defsites.put(currentMethod, fileLoc);
+ callsites = getCallsites(context.getRuntime());
+
+ if (!callsites.containsKey(currentMethod)) {
+ callsites.put(currentMethod, RubyHash.newHash(context.getRuntime()));
+ }
+
+ RubyHash hash = (RubyHash) callsites.get(currentMethod);
+ RubyArray callerArray = customBacktrace(context);
+
+ if (!hash.containsKey(callerArray)) {
+ hash.put(callerArray, Long.valueOf(0));
+ }
+
+ Long count = (Long) hash.get(callerArray);
+ long itCount = count.longValue() + 1L;
+ hash.put(callerArray, Long.valueOf(itCount));
+ context.setWithinTrace(false);
}
-
- private RubyArray customBacktrace(ThreadContext context) {
- Frame[] frames = context.createBacktrace(1, false);
- RubyArray ary = context.getRuntime().newArray();
- ary.addAll(formatBacktrace(context.getRuntime(), frames[frames.length - 1]));
-
- return context.getRuntime().newArray((IRubyObject) ary);
+ }
+
+ private RubyArray customBacktrace(ThreadContext context) {
+ Frame[] frames = context.createBacktrace(1, false);
+ RubyArray ary = context.getRuntime().newArray();
+ ary.addAll(formatBacktrace(context.getRuntime(), frames[frames.length - 1]));
+ return context.getRuntime().newArray((IRubyObject) ary);
+ }
+
+ /*
+ * TODO: The logic in this method really needs to be wrapped in a backtrace
+ * object or something. Then I could fix the file path issues that cause
+ * test failures.
+ * @param runtime
+ * @param backtrace
+ * @return
+ */
+ private RubyArray formatBacktrace(Ruby runtime, Frame backtrace) {
+ RubyArray ary = runtime.newArray();
+
+ if (backtrace == null) {
+ ary.add(runtime.getNil());
+ ary.add(runtime.getNil());
+ ary.add("");
+ ary.add(Long.valueOf(0));
+ } else {
+ ary.add(backtrace.getKlazz());
+ ary.add((backtrace.getName() == null ? runtime.getNil() : runtime.newSymbol( backtrace.getName())));
+ ary.add(backtrace.getFile());
+ //Add 1 to compensate for the zero offset in the Frame elements.
+ ary.add(backtrace.getLine() + 1);
}
-
- /**
- * TODO: The logic in this method really needs to be wrapped in a backtrace
- * object or something. Then I could fix the file path issues that cause
- * test failures.
- * @param runtime
- * @param backtrace
- * @return
- */
- private RubyArray formatBacktrace(Ruby runtime, Frame backtrace) {
- RubyArray ary = runtime.newArray();
- if ( backtrace == null ) {
- ary.add(runtime.getNil());
- ary.add(runtime.getNil());
- ary.add("");
- ary.add(Long.valueOf(0));
- } else {
- ary.add( backtrace.getKlazz());
- ary.add( ( backtrace.getName() == null ?
- runtime.getNil() :
- runtime.newSymbol( backtrace.getName() ) ) );
- ary.add(backtrace.getFile());
- //Add 1 to compensate for the zero offset in the Frame elements.
- ary.add(backtrace.getLine() + 1);
- }
-
- return ary;
- }
-
- private RubyHash getCallsites(Ruby runtime) {
- if (this.callsites == null) {
- this.callsites = RubyHash.newHash(runtime);
- }
- return this.callsites;
+
+ return ary;
+ }
+
+ private RubyHash getCallsites(Ruby runtime) {
+ if (this.callsites == null) {
+ this.callsites = RubyHash.newHash(runtime);
}
-
- private RubyHash getDefsites(Ruby runtime) {
- if (this.defsites == null) {
- this.defsites = RubyHash.newHash(runtime);
- }
- return this.defsites;
+
+ return this.callsites;
+ }
+
+ private RubyHash getDefsites(Ruby runtime) {
+ if (this.defsites == null) {
+ this.defsites = RubyHash.newHash(runtime);
}
-
+
+ return this.defsites;
+ }
}
View
195 ext/java/src/CoverageHook.java
@@ -5,114 +5,113 @@
import org.jruby.runtime.RubyEvent;
import org.jruby.runtime.builtin.IRubyObject;
-
public class CoverageHook extends RcovHook {
-
- private static CoverageHook hook;
-
- public static CoverageHook getCoverageHook() {
- if (hook == null) {
- hook = new CoverageHook();
- }
- return hook;
+
+ private static CoverageHook hook;
+
+ public static CoverageHook getCoverageHook() {
+ if (hook == null) {
+ hook = new CoverageHook();
}
-
- private boolean active;
- private RubyHash cover;
- private CoverageHook() {
- super();
- }
-
- public boolean isActive() {
- return active;
- }
-
- public void setActive(boolean active) {
- this.active = active;
+ return hook;
+ }
+
+ private boolean active;
+ private RubyHash cover;
+
+ private CoverageHook() {
+ super();
+ }
+
+ public boolean isActive() {
+ return active;
+ }
+
+ public void setActive(boolean active) {
+ this.active = active;
+ }
+
+ public void eventHandler(ThreadContext context, String event, String file, int line, String name, IRubyObject type) {
+ //Line numbers are 1s based. Arrays are zero based. We need to compensate for that.
+ line -= 1;
+
+ // Make sure that we have SCRIPT_LINES__ and it's a hash
+ RubyHash scriptLines = getScriptLines(context.getRuntime());
+ if (scriptLines == null || !scriptLines.containsKey(file)) {
+ return;
}
-
- public void eventHandler(ThreadContext context, String event, String file, int line,
- String name, IRubyObject type) {
- //Line numbers are 1s based. Arrays are zero based. We need to compensate for that.
- line -= 1;
-
- // Make sure that we have SCRIPT_LINES__ and it's a hash
- RubyHash scriptLines = getScriptLines(context.getRuntime());
- if (scriptLines == null || !scriptLines.containsKey(file)) {
- return;
- }
-
- // make sure the file's source lines are in SCRIPT_LINES__
- cover = getCover(context.getRuntime());
- RubyArray lines = (RubyArray) scriptLines.get(file);
- if (lines == null || cover == null){
- return;
- }
-
- // make sure file's counts are in COVER and set to zero
- RubyArray counts = (RubyArray) cover.get(file);
- if (counts == null) {
- counts = context.getRuntime().newArray();
- for (int i = 0; i < lines.size(); i++) {
- counts.add(Long.valueOf(0));
- }
- cover.put(file, counts);
- }
-
- // in the case of code generation (one example is instance_eval for routes optimization)
- // We could get here and see that we are not matched up with what we expect
- if (counts.size() <= line ) {
- for (int i=counts.size(); i<= line; i++) {
- counts.add(Long.valueOf(0));
- }
- }
-
- if (!context.isWithinTrace()) {
- try {
- context.setWithinTrace(true);
- // update counts in COVER
- Long count = (Long) counts.get(line);
- if (count == null) {
- count = Long.valueOf(0);
- }
- count = Long.valueOf(count.longValue() + 1);
- counts.set(line , count);
- }
- finally{
- context.setWithinTrace(false);
- }
- }
+
+ // make sure the file's source lines are in SCRIPT_LINES__
+ cover = getCover(context.getRuntime());
+ RubyArray lines = (RubyArray) scriptLines.get(file);
+ if (lines == null || cover == null){
+ return;
}
-
- public boolean isInterestedInEvent(RubyEvent event) {
- return event == RubyEvent.CALL || event == RubyEvent.LINE || event == RubyEvent.RETURN || event == RubyEvent.CLASS || event == RubyEvent.C_RETURN || event == RubyEvent.C_CALL;
+
+ // make sure file's counts are in COVER and set to zero
+ RubyArray counts = (RubyArray) cover.get(file);
+ if (counts == null) {
+ counts = context.getRuntime().newArray();
+ for (int i = 0; i < lines.size(); i++) {
+ counts.add(Long.valueOf(0));
+ }
+ cover.put(file, counts);
}
- /**
- * Returns the COVER hash, setting up the COVER constant if necessary.
- * @param runtime
- * @return
- */
- public RubyHash getCover(Ruby runtime) {
- if (cover == null) {
- cover = RubyHash.newHash(runtime);
- }
- return cover;
+ // in the case of code generation (one example is instance_eval for routes optimization)
+ // We could get here and see that we are not matched up with what we expect
+ if (counts.size() <= line ) {
+ for (int i=counts.size(); i<= line; i++) {
+ counts.add(Long.valueOf(0));
+ }
}
- public RubyHash getScriptLines(Ruby runtime) {
- IRubyObject scriptLines = runtime.getObject().getConstantAt("SCRIPT_LINES__");
- if (scriptLines instanceof RubyHash) {
- return (RubyHash) scriptLines;
- } else {
- return null;
+ if (!context.isWithinTrace()) {
+ try {
+ context.setWithinTrace(true);
+ // update counts in COVER
+ Long count = (Long) counts.get(line);
+ if (count == null) {
+ count = Long.valueOf(0);
}
+ count = Long.valueOf(count.longValue() + 1);
+ counts.set(line , count);
+ }
+ finally{
+ context.setWithinTrace(false);
+ }
}
-
- public IRubyObject resetCoverage(Ruby runtime) {
- getCover(runtime).clear();
- return runtime.getNil();
+ }
+
+ public boolean isInterestedInEvent(RubyEvent event) {
+ return event == RubyEvent.CALL || event == RubyEvent.LINE || event == RubyEvent.RETURN || event == RubyEvent.CLASS || event == RubyEvent.C_RETURN || event == RubyEvent.C_CALL;
+ }
+
+ /*
+ * Returns the COVER hash, setting up the COVER constant if necessary.
+ * @param runtime
+ * @return
+ */
+ public RubyHash getCover(Ruby runtime) {
+ if (cover == null) {
+ cover = RubyHash.newHash(runtime);
}
-
+
+ return cover;
+ }
+
+ public RubyHash getScriptLines(Ruby runtime) {
+ IRubyObject scriptLines = runtime.getObject().getConstantAt("SCRIPT_LINES__");
+ if (scriptLines instanceof RubyHash) {
+ return (RubyHash) scriptLines;
+ } else {
+ return null;
+ }
+ }
+
+ public IRubyObject resetCoverage(Ruby runtime) {
+ getCover(runtime).clear();
+ return runtime.getNil();
+ }
}
View
10 ext/java/src/RcovHook.java
@@ -1,11 +1,9 @@
import org.jruby.runtime.EventHook;
-
public abstract class RcovHook extends EventHook {
+ /** returns true if the hook is set */
+ abstract boolean isActive();
- /** returns true if the hook is set */
- abstract boolean isActive();
-
- /** used to mark the hook set or unset */
- abstract void setActive(boolean active);
+ /** used to mark the hook set or unset */
+ abstract void setActive(boolean active);
}
View
212 ext/java/src/RcovrtService.java
@@ -14,121 +14,117 @@
import org.jruby.javasupport.JavaUtil;
public class RcovrtService implements BasicLibraryService {
+
+ private static RubyObjectAdapter rubyApi;
+
+ public boolean basicLoad(Ruby runtime) {
+ RubyModule rcov = runtime.getOrCreateModule("Rcov");
+ RubyModule rcov__ = runtime.defineModuleUnder("RCOV__", rcov);
+ IRubyObject sl = runtime.getObject().getConstantAt("SCRIPT_LINES__");
- private static RubyObjectAdapter rubyApi;
-
- public boolean basicLoad(Ruby runtime) {
- RubyModule rcov = runtime.getOrCreateModule("Rcov");
- RubyModule rcov__ = runtime.defineModuleUnder("RCOV__", rcov);
-
- IRubyObject sl = runtime.getObject().getConstantAt("SCRIPT_LINES__");
- if (sl == null) {
- runtime.getObject().setConstant("SCRIPT_LINES__", RubyHash.newHash(runtime));
- }
-
- rubyApi = JavaEmbedUtils.newObjectAdapter();
- rcov__.defineAnnotatedMethods(RcovrtService.class);
- return true;
- }
-
-
- @JRubyMethod(name="reset_callsite", meta = true)
- public static IRubyObject resetCallsite(IRubyObject recv) {
- CallsiteHook hook = CallsiteHook.getCallsiteHook();
- if (hook.isActive()) {
- throw RaiseException.createNativeRaiseException(
- recv.getRuntime(),
- new RuntimeException("Cannot reset the callsite info in the middle of a traced run."));
- }
- return hook.resetDefsites();
- }
-
- @JRubyMethod(name="reset_coverage", meta = true)
- public static IRubyObject resetCoverage(IRubyObject recv) {
- CoverageHook hook = CoverageHook.getCoverageHook();
- if (hook.isActive()) {
- throw RaiseException.createNativeRaiseException(
- recv.getRuntime(),
- new RuntimeException("Cannot reset the coverage info in the middle of a traced run."));
- }
- return hook.resetCoverage(recv.getRuntime());
- }
-
- @JRubyMethod(name="remove_coverage_hook", meta = true)
- public static IRubyObject removeCoverageHook(IRubyObject recv) {
- return removeRcovHook(recv, CoverageHook.getCoverageHook());
- }
-
- @JRubyMethod(name="install_coverage_hook", meta = true)
- public static IRubyObject installCoverageHook(IRubyObject recv) {
- return installRcovHook(recv, CoverageHook.getCoverageHook());
+ if (sl == null) {
+ runtime.getObject().setConstant("SCRIPT_LINES__", RubyHash.newHash(runtime));
}
-
- /**
- TODO: I think this is broken. I'm not sure why, but recreating
- cover all the time seems bad.
- */
- @JRubyMethod(name="generate_coverage_info", meta = true)
- public static IRubyObject generateCoverageInfo(IRubyObject recv) {
- Ruby run = recv.getRuntime();
- RubyHash cover = (RubyHash)CoverageHook.getCoverageHook().getCover(run);
- RubyHash xcover = RubyHash.newHash(run);
- RubyArray keys = cover.keys();
- RubyArray temp;
- ThreadContext ctx = run.getCurrentContext();
- for (int i=0; i < keys.length().getLongValue(); i++) {
- IRubyObject key = keys.aref(JavaUtil.convertJavaToRuby(run, Long.valueOf(i)));
- temp = ((RubyArray)cover.op_aref(ctx, key)).aryDup();
- xcover.op_aset(ctx,key, temp);
- }
- RubyModule rcov__ = (RubyModule) recv.getRuntime().getModule("Rcov").getConstant("RCOV__");
-
- if (rcov__.const_defined_p(ctx, RubySymbol.newSymbol(recv.getRuntime(), "COVER")).isTrue()) {
- rcov__.remove_const(ctx, recv.getRuntime().newString("COVER"));
- }
- rcov__.defineConstant( "COVER", xcover );
-
- return xcover;
- }
-
- @JRubyMethod(name="remove_callsite_hook", meta = true)
- public static IRubyObject removeCallsiteHook(IRubyObject recv) {
- return removeRcovHook( recv, CallsiteHook.getCallsiteHook() );
- }
-
- @JRubyMethod(name="install_callsite_hook", meta = true)
- public static IRubyObject installCallsiteHook(IRubyObject recv) {
- return installRcovHook( recv, CallsiteHook.getCallsiteHook() );
+
+ rubyApi = JavaEmbedUtils.newObjectAdapter();
+ rcov__.defineAnnotatedMethods(RcovrtService.class);
+ return true;
+ }
+
+ @JRubyMethod(name="reset_callsite", meta = true)
+ public static IRubyObject resetCallsite(IRubyObject recv) {
+ CallsiteHook hook = CallsiteHook.getCallsiteHook();
+ if (hook.isActive()) {
+ throw RaiseException.createNativeRaiseException(recv.getRuntime(),
+ new RuntimeException("Cannot reset the callsite info in the middle of a traced run."));
}
-
- @JRubyMethod(name="generate_callsite_info", meta = true)
- public static IRubyObject generateCallsiteInfo(IRubyObject recv) {
- return CallsiteHook.getCallsiteHook().getCallsiteInfo( recv.getRuntime() ).dup();
+ return hook.resetDefsites();
+ }
+
+ @JRubyMethod(name="reset_coverage", meta = true)
+ public static IRubyObject resetCoverage(IRubyObject recv) {
+ CoverageHook hook = CoverageHook.getCoverageHook();
+ if (hook.isActive()) {
+ throw RaiseException.createNativeRaiseException(recv.getRuntime(),
+ new RuntimeException("Cannot reset the coverage info in the middle of a traced run."));
}
-
- @JRubyMethod(name="ABI", meta = true)
- public static IRubyObject getAbi( IRubyObject recv ) {
- RubyArray ary = recv.getRuntime().newArray();
- ary.add( RubyFixnum.int2fix( recv.getRuntime(), 2L ) );
- ary.add( RubyFixnum.int2fix( recv.getRuntime(), 0L ) );
- ary.add( RubyFixnum.int2fix( recv.getRuntime(), 0L ) );
- return ary;
+ return hook.resetCoverage(recv.getRuntime());
+ }
+
+ @JRubyMethod(name="remove_coverage_hook", meta = true)
+ public static IRubyObject removeCoverageHook(IRubyObject recv) {
+ return removeRcovHook(recv, CoverageHook.getCoverageHook());
+ }
+
+ @JRubyMethod(name="install_coverage_hook", meta = true)
+ public static IRubyObject installCoverageHook(IRubyObject recv) {
+ return installRcovHook(recv, CoverageHook.getCoverageHook());
+ }
+
+ /*
+ TODO: I think this is broken. I'm not sure why, but recreating
+ cover all the time seems bad.
+ */
+ @JRubyMethod(name="generate_coverage_info", meta = true)
+ public static IRubyObject generateCoverageInfo(IRubyObject recv) {
+ Ruby run = recv.getRuntime();
+ RubyHash cover = (RubyHash)CoverageHook.getCoverageHook().getCover(run);
+ RubyHash xcover = RubyHash.newHash(run);
+ RubyArray keys = cover.keys();
+ RubyArray temp;
+ ThreadContext ctx = run.getCurrentContext();
+ for (int i=0; i < keys.length().getLongValue(); i++) {
+ IRubyObject key = keys.aref(JavaUtil.convertJavaToRuby(run, Long.valueOf(i)));
+ temp = ((RubyArray)cover.op_aref(ctx, key)).aryDup();
+ xcover.op_aset(ctx,key, temp);
}
+ RubyModule rcov__ = (RubyModule) recv.getRuntime().getModule("Rcov").getConstant("RCOV__");
- private static IRubyObject removeRcovHook( IRubyObject recv, RcovHook hook ) {
- hook.setActive( false );
- recv.getRuntime().removeEventHook( hook );
- return recv.getRuntime().getFalse();
+ if (rcov__.const_defined_p(ctx, RubySymbol.newSymbol(recv.getRuntime(), "COVER")).isTrue()) {
+ rcov__.remove_const(ctx, recv.getRuntime().newString("COVER"));
}
+ rcov__.defineConstant( "COVER", xcover );
- private static IRubyObject installRcovHook( IRubyObject recv, RcovHook hook ) {
- if ( !hook.isActive() ) {
- hook.setActive( true );
- recv.getRuntime().addEventHook( hook );
- return recv.getRuntime().getTrue();
- } else {
- return recv.getRuntime().getFalse();
- }
+ return xcover;
+ }
+
+ @JRubyMethod(name="remove_callsite_hook", meta = true)
+ public static IRubyObject removeCallsiteHook(IRubyObject recv) {
+ return removeRcovHook( recv, CallsiteHook.getCallsiteHook() );
+ }
+
+ @JRubyMethod(name="install_callsite_hook", meta = true)
+ public static IRubyObject installCallsiteHook(IRubyObject recv) {
+ return installRcovHook( recv, CallsiteHook.getCallsiteHook() );
+ }
+
+ @JRubyMethod(name="generate_callsite_info", meta = true)
+ public static IRubyObject generateCallsiteInfo(IRubyObject recv) {
+ return CallsiteHook.getCallsiteHook().getCallsiteInfo( recv.getRuntime() ).dup();
+ }
+
+ @JRubyMethod(name="ABI", meta = true)
+ public static IRubyObject getAbi(IRubyObject recv) {
+ RubyArray ary = recv.getRuntime().newArray();
+ ary.add(RubyFixnum.int2fix( recv.getRuntime(), 2L));
+ ary.add(RubyFixnum.int2fix( recv.getRuntime(), 0L));
+ ary.add(RubyFixnum.int2fix( recv.getRuntime(), 0L));
+ return ary;
+ }
+
+ private static IRubyObject removeRcovHook(IRubyObject recv, RcovHook hook) {
+ hook.setActive(false);
+ recv.getRuntime().removeEventHook(hook);
+ return recv.getRuntime().getFalse();
+ }
+
+ private static IRubyObject installRcovHook( IRubyObject recv, RcovHook hook ) {
+ if (!hook.isActive()) {
+ hook.setActive(true);
+ recv.getRuntime().addEventHook(hook);
+ return recv.getRuntime().getTrue();
+ } else {
+ return recv.getRuntime().getFalse();
}
-
+ }
}
View
2 lib/rcov/version.rb
@@ -3,7 +3,7 @@
# See LICENSE for licensing information.
module Rcov
- VERSION = "0.9.1"
+ VERSION = "0.9.1.1"
RELEASE_DATE = "2009-08-30"
RCOVRT_ABI = [2,0,0]
UPSTREAM_URL = "http://github.com/relevance/rcov"
View
BIN lib/rcovrt.jar
Binary file not shown.
View
2 rcov-java.gemspec
@@ -24,7 +24,7 @@ PKG_FILES = ["bin/rcov", "lib/rcov.rb", "lib/rcov/lowlevel.rb", "lib/rcov/versio
Gem::Specification.new do |s|
s.name = %q{rcov}
- s.version = "0.9.1"
+ s.version = "0.9.1.1"
s.required_rubygems_version = nil if s.respond_to? :required_rubygems_version=
s.authors = ["Relevance", "Chad Humphries (spicycode)", "Aaron Bedra (abedra)", "Jay McGaffigan", "Mauricio Fernandez"]
View
2 rcov.gemspec
@@ -25,7 +25,7 @@ PKG_FILES = ["bin/rcov", "lib/rcov.rb", "lib/rcov/lowlevel.rb", "lib/rcov/versio
Gem::Specification.new do |s|
s.name = %q{rcov}
- s.version = "0.9.1"
+ s.version = "0.9.1.1"
s.required_rubygems_version = nil if s.respond_to? :required_rubygems_version=
s.authors = ["Relevance", "Chad Humphries (spicycode)", "Aaron Bedra (abedra)", "Jay McGaffigan", "Mauricio Fernandez"]

0 comments on commit 1b6d008

Please sign in to comment.