diff options
| author | jinroq <2787780+jinroq@users.noreply.github.com> | 2023-12-03 06:17:53 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-02 13:17:53 -0800 |
| commit | d4b1f56f50903403cb75451215298ceb56f2302c (patch) | |
| tree | 8f0ba35bfac916f2c52c7c2bfdc99f5278dded4b /lib | |
| parent | ad54fbf281ca1935e79f4df1460b0106ba76761e (diff) | |
[Fix] Support when nil is assigned to variable `name` (#9105)
* Add `!name.nil?` to if condition
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/ruby_vm/rjit/c_pointer.rb | 2 |
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}" |
