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 */
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. :-)