Skip to content

Commit c94eeb8

Browse files
committedMar 6, 2018
heh. I should have left this as-is until I changed Thread API to allow
IRubyObject.
1 parent 5148f79 commit c94eeb8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

Diff for: ‎core/src/main/java/org/jruby/internal/runtime/NativeThread.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public Thread nativeThread() {
114114
@Deprecated
115115
public void setRubyName(String name) {
116116
if (name == null) {
117-
rubyName = rubyThread.getContext().nil;
117+
rubyName = null;
118118
} else {
119119
rubyName = rubyThread.getContext().runtime.newString(name);
120120
}
@@ -151,7 +151,7 @@ void updateName() {
151151
// "Ruby-0-Thread-16: (irb):21"
152152
// "Ruby-0-Thread-17@worker#1: (irb):21"
153153
String newName;
154-
String setName = rubyName.asJavaString();
154+
String setName = rubyName == null ? null : rubyName.asJavaString();
155155
Thread thread = getThread();
156156

157157
if (thread == null) return;

0 commit comments

Comments
 (0)
Please sign in to comment.