I have successfully used net-smb on my raspberry pi, but on my mac I get a segfault when I run the exact same script. It happens with the opendir function.
I have tried with latest ruby 1.9.3.
On the raspberry I have compiled samba 4 (latest from git) while on the Mac I am using the homebrew version (3.6.8)
using smbclient to connect to the smb share and opening the directory with "cd" works on both systems though.
ruby spits out this after crashing:
./server-list2.rb:36: [BUG] Segmentation fault
ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-darwin12.4.0]
-- Control frame information -----------------------------------------------
c:0005 p:---- s:0015 b:0015 l:000014 d:000014 CFUNC :initialize
c:0004 p:---- s:0013 b:0013 l:000012 d:000012 CFUNC :opendir
c:0003 p:0211 s:0009 b:0009 l:000db8 d:002140 EVAL ./server-list2.rb:36
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:000db8 d:000db8 TOP
-- Ruby level backtrace information ----------------------------------------
./server-list2.rb:36:in <main>' ./server-list2.rb:36:in
opendir'
./server-list2.rb:36:in `initialize'
-- C level backtrace information -------------------------------------------
See Crash Report log file under ~/Library/Logs/CrashReporter or
/Library/Logs/CrashReporter, for the more detail of.
Gist of crashreport is here:
https://gist.github.com/tkrajacic/6026664