File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
truffle/src/main/java/org/jruby/truffle/nodes/core Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 1818import org .jruby .truffle .runtime .RubyContext ;
1919import org .jruby .truffle .runtime .backtrace .Backtrace ;
2020import org .jruby .truffle .runtime .core .RubyArray ;
21+ import org .jruby .truffle .runtime .core .RubyHash ;
2122import org .jruby .truffle .runtime .core .RubyNilClass ;
2223import org .jruby .truffle .runtime .core .RubyString ;
2324
@@ -119,7 +120,7 @@ public StorageClassNode(StorageClassNode prev) {
119120 }
120121
121122 @ Specialization
122- public RubyString javaClassOf (RubyArray array ) {
123+ public RubyString storageClass (RubyArray array ) {
123124 notDesignedForCompilation ();
124125
125126 if (array .getStore () == null ) {
@@ -129,6 +130,17 @@ public RubyString javaClassOf(RubyArray array) {
129130 }
130131 }
131132
133+ @ Specialization
134+ public RubyString storageClass (RubyHash hash ) {
135+ notDesignedForCompilation ();
136+
137+ if (hash .getStore () == null ) {
138+ return getContext ().makeString ("null" );
139+ } else {
140+ return getContext ().makeString (hash .getStore ().getClass ().getName ());
141+ }
142+ }
143+
132144 }
133145
134146 @ CoreMethod (names = "panic" , onSingleton = true )
You can’t perform that action at this time.
0 commit comments