Skip to content

Instantly share code, notes, and snippets.

@enebo
Created February 25, 2020 20:31
Show Gist options
  • Select an option

  • Save enebo/4d02f64d7111f749bdc9e853b6e6907a to your computer and use it in GitHub Desktop.

Select an option

Save enebo/4d02f64d7111f749bdc9e853b6e6907a to your computer and use it in GitHub Desktop.
diff --git a/core/src/main/java/org/jruby/Ruby.java b/core/src/main/java/org/jruby/Ruby.java
index d21b780e1a..d530c60e84 100644
--- a/core/src/main/java/org/jruby/Ruby.java
+++ b/core/src/main/java/org/jruby/Ruby.java
@@ -2924,10 +2924,16 @@ public final class Ruby implements Constantizable {
Ruby runtime = context.runtime;
RubyBinding binding = RubyBinding.newBinding(runtime, context.currentBinding());
+ RubyString eventNameString = runtime.newString(eventName.equals("c_return") ?
+ "c-return" :
+ eventName.equals("c_call") ?
+ "c-call" :
+ eventName);
+
context.preTrace();
try {
traceFunc.call(context, new IRubyObject[]{
- runtime.newString(eventName), // event name
+ eventNameString,
runtime.newString(file), // filename
runtime.newFixnum(line), // line numbers should be 1-based
name != null ? runtime.newSymbol(name) : runtime.getNil(),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment