aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ruby_vm/rjit/c_pointer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ruby_vm/rjit/c_pointer.rb')
-rw-r--r--lib/ruby_vm/rjit/c_pointer.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ruby_vm/rjit/c_pointer.rb b/lib/ruby_vm/rjit/c_pointer.rb
index d65d5a93a5..1a84896822 100644
--- a/lib/ruby_vm/rjit/c_pointer.rb
+++ b/lib/ruby_vm/rjit/c_pointer.rb
@@ -338,7 +338,7 @@ module RubyVM::RJIT
# Give a name to a dynamic CPointer class to see it on inspect
def self.with_class_name(prefix, name, cache: false, &block)
- return block.call if name.empty?
+ return block.call if !name.nil? && name.empty?
# Use a cached result only if cache: true
class_name = "#{prefix}_#{name}"