Skip to content

Commit ea06b28

Browse files
nobukou
authored andcommitted
Use RbConfig::SIZEOF (#19)
1 parent f593338 commit ea06b28

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/fiddle/helper.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
libm_so = "cygwin1.dll"
1313
when /linux/
1414
libdir = '/lib'
15-
case [0].pack('L!').size
15+
case RbConfig::SIZEOF['void*']
1616
when 4
1717
# 32-bit ruby
1818
libdir = '/lib32' if File.directory? '/lib32'
@@ -46,7 +46,7 @@
4646
libm_so = "/usr/lib/libm.so"
4747
when /solaris/
4848
libdir = '/lib'
49-
case [0].pack('L!').size
49+
case RbConfig::SIZEOF['void*']
5050
when 4
5151
# 32-bit ruby
5252
libdir = '/lib' if File.directory? '/lib'

0 commit comments

Comments
 (0)