[MacRuby-devel] [MacRuby] #524: [FFI] can't convert Symbol into String

MacRuby ruby-noreply at macosforge.org
Sun Dec 27 04:28:57 PST 2009


#524: [FFI] can't convert Symbol into String
--------------------------------+-------------------------------------------
 Reporter:  conradwt@…          |       Owner:  lsansonetti@…        
     Type:  defect              |      Status:  new                  
 Priority:  blocker             |   Milestone:                       
Component:  MacRuby             |    Keywords:                       
--------------------------------+-------------------------------------------
 When I run the code on Snow Leopard r3174,

 {{{
 require 'ffi'

 module MyLib
   extend FFI::Library
   attach_function :puts, [ :string ], :int
 end

 MyLib.puts 'Hello boys using libc!'
 }}}

 I'm seeing the following message:

 On MacRuby version 0.5 (ruby 1.9.0) [universal-darwin10.0, x86_64]:
 {{{
 $ macruby ffi-test.rb
 core:in `attach_function:': can't convert Symbol into String (TypeError)
 }}}

 On ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-darwin10]:
 {{{
 $ ruby ffi-test.rb
 ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-darwin10]
 }}}

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/524>
MacRuby <http://macruby.org/>



More information about the MacRuby-devel mailing list