First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 186838
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Ruby Team <ruby@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Kevin Worth <kworth@gmail.com>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 186838 depends on: Show dependency tree
Bug 186838 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-07-27 19:56 0000
It appears that this is due to the fact that this code is about 7 years old
now...

Ideally this should probably be pushed upstream, and I have contacted the
author fukusima at goto.info.waseda.ac.jp about releasing a patched version,
but I'm not sure if I'll get a response.

See below for patch.

Reproducible: Always

Steps to Reproduce:
install ruby-pcap
attempt to require pcaplet in any ruby program (even the one-liner below works)
$ruby -e "require 'pcaplet'"
Actual Results:  
/usr/lib/ruby/site_ruby/1.8/i686-linux/pcap.so: warning: do not use Fixnums as
Symbols
/usr/lib/ruby/site_ruby/1.8/i686-linux/pcap.so: warning: do not use Fixnums as
Symbols
/usr/lib/ruby/site_ruby/1.8/i686-linux/pcap.so: warning: do not use Fixnums as
Symbols


Expected Results:  
Nothing, the file should be included silently

--- Pcap.c.orig 2007-07-27 12:44:55.000000000 -0700
+++ Pcap.c      2007-07-27 12:45:22.000000000 -0700
@@ -782,9 +782,9 @@
     /* define class PcapStat */
     cPcapStat = rb_funcall(rb_cStruct, rb_intern("new"), 4,
                           Qnil,
-                          INT2NUM(rb_intern("recv")),
-                          INT2NUM(rb_intern("drop")),
-                          INT2NUM(rb_intern("ifdrop")));
+                          ID2SYM(rb_intern("recv")),
+                          ID2SYM(rb_intern("drop")),
+                          ID2SYM(rb_intern("ifdrop")));
     rb_define_const(mPcap, "Stat", cPcapStat);

     /* define exception classes */

------- Comment #1 From Hans de Graaff 2007-08-04 19:38:37 0000 -------
Thanks, I've added the patch to CVS directly to ruby-pcap-0.6.

In the future, please include the patch as an attachment, even if it is as
small as this one, so that whitespace won't get mangled. Keeps me from
reproducing the patch myself. :-)

First Last Prev Next    No search results available      Search page      Enter new bug