[Bug 551791] New: yast2-ruby-bindings: cannot pass hash from ruby to ycp
http://bugzilla.novell.com/show_bug.cgi?id=551791 Summary: yast2-ruby-bindings: cannot pass hash from ruby to ycp Classification: openSUSE Product: openSUSE 11.2 Version: Final Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: YaST2 AssignedTo: dmacvicar@novell.com ReportedBy: jsuchome@novell.com QAContact: jsrain@novell.com CC: mvidner@novell.com Found By: --- I'm trying to call ruby library from ycp, but when the function should return non-empty hash (map), it fails.
cat ./ruby_from_ycp_3.ycp { import "YML"; any parsed = YML::parse ("/tmp/custom_services.yml"); y2internal ("parsed: %1", parsed); }
cat YML.rb require 'yaml'
module YML def self.parse(file_name) ret = { "a" => 1 } return ret end end
sudo cp YML.rb /usr/share/YaST2/modules/ yast2 ./ruby_from_ycp_3.ycp (eval):0:in `at': can't convert false into Integer (TypeError) YaST got signal 11 at YCP file /home/jsuchome/yast/trunk/ruby-bindings/examples/ruby/ruby_from_ycp_3.ycp:3 /sbin/yast2: line 440: 14030 Segmentation fault $ybindir/y2base $module "$@" "$SELECTED_GUI" $Y2_GEOMETRY $Y2UI_ARGS
-- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=551791
User dmacvicar@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=551791#c1
Duncan Mac-Vicar
participants (1)
-
bugzilla_noreply@novell.com