File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -132,11 +132,12 @@ def ary_len(self):
132
132
return len
133
133
134
134
def bignum_len (self ):
135
- if self .flags & flUser2 :
135
+ if self .flags & self . flUser2 :
136
136
len = ((self .flags &
137
137
(self .flUser3 | self .flUser4 | self .flUser5 )
138
138
) >> (self .flUshift + 3 ))
139
139
else :
140
- len = self .val .GetValueForExpressionPath ("->as.heap.len" )
140
+ len = (self .as_type ("bignum" ).GetValueForExpressionPath ("->as.heap.len" ).
141
+ GetValueAsUnsigned ())
141
142
142
143
return len
Original file line number Diff line number Diff line change @@ -175,8 +175,6 @@ def inspect(self, val):
175
175
self ._append_command_output ("p *(struct RHash *) %0#x" % val .GetValueAsUnsigned ())
176
176
177
177
elif rval .is_type ("RUBY_T_BIGNUM" ):
178
- tRBignum = self .target .FindFirstType ("struct RBignum" ).GetPointerType ()
179
-
180
178
sign = '-'
181
179
if (rval .flags & self .ruby_globals ["RUBY_FL_USER1" ]) != 0 :
182
180
sign = '+'
@@ -188,9 +186,9 @@ def inspect(self, val):
188
186
% val .GetValueAsUnsigned ())
189
187
else :
190
188
print ("T_BIGNUM: sign=%s len=%d" % (sign , len ), file = self .result )
191
- print (val . Dereference ( ), file = self .result )
189
+ print (rval . as_type ( "bignum" ), file = self .result )
192
190
self ._append_command_output (
193
- "expression -Z %x -fx -- (const BDIGIT*) ((struct RBignum*)%d)->as.heap.digits" %
191
+ "expression -Z %d -fx -- ((struct RBignum*)%d)->as.heap.digits" %
194
192
(len , val .GetValueAsUnsigned ()))
195
193
196
194
elif rval .is_type ("RUBY_T_FLOAT" ):
You can’t perform that action at this time.
0 commit comments