File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
src/main/ruby/truffleruby/core/truffle/ffi Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ Compatibility:
37
37
* Add ` rb_syserr_new ` function (@rwstauner ).
38
38
* Add ` Enumerator#product ` (#3039 , @itarato ).
39
39
* Add ` Module#const_added ` (#3039 , @itarato ).
40
+ * Show the pointer size information (if available) in ` FFI::Pointer#inspect ` (@nirvdrum ).
40
41
41
42
Performance:
42
43
Original file line number Diff line number Diff line change @@ -98,7 +98,12 @@ def inspect
98
98
sign = ''
99
99
end
100
100
101
- "#<#{ Primitive . class ( self ) . name } address=#{ sign } 0x#{ addr . to_s ( 16 ) } >"
101
+ size = Primitive . pointer_size ( self )
102
+ if size != UNBOUNDED
103
+ "#<#{ Primitive . class ( self ) . name } address=#{ sign } 0x#{ addr . to_s ( 16 ) } size=#{ size } >"
104
+ else
105
+ "#<#{ Primitive . class ( self ) . name } address=#{ sign } 0x#{ addr . to_s ( 16 ) } >"
106
+ end
102
107
end
103
108
104
109
def null?
You can’t perform that action at this time.
0 commit comments