Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't do TRAP_BEG / TRAP_END on any version of Ruby 1.9.

  • Loading branch information...
commit 6df9af8e2b831daf6bad874865e91c2a0be8e4ac 1 parent ada8ef7
Ilya Maykov authored
Showing with 8 additions and 6 deletions.
  1. +1 −1  VERSION
  2. +5 −3 ext/extconf.rb
  3. +2 −2 pcap.gemspec
View
2  VERSION
@@ -1 +1 @@
-0.7.6
+0.7.7
View
8 ext/extconf.rb
@@ -7,9 +7,11 @@
$CFLAGS = "-I#{pcap_includedir}"
$LDFLAGS = "-L#{pcap_libdir}"
-if RUBY_PLATFORM.match(/.*darwin.*/) && RUBY_VERSION.match(/^1\.9.*/)
- $defs.push("-DPCAP_DONT_TRAP=1")
-end
+# According to the blog entry at
+# http://blog.phusion.nl/2010/06/10/making-ruby-threadable-properly-handling-context-switching-in-native-extensions/
+# TRAP_BEG and TRAP_END just release / reacquire the GIL (global interpreter lock) on Ruby 1.9, which means
+# they should not be used in our case.
+$defs.push("-DPCAP_DONT_TRAP=1") if RUBY_VERSION >= '1.9'
have_library("socket", "socket")
have_library("xnet", "gethostbyname")
View
4 pcap.gemspec
@@ -5,11 +5,11 @@
Gem::Specification.new do |s|
s.name = %q{pcap}
- s.version = "0.7.6"
+ s.version = "0.7.7"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = [%q{Masaki Fukushima}, %q{Andrew Hobson}]
- s.date = %q{2011-06-09}
+ s.date = %q{2011-06-10}
s.description = %q{Ruby interface to LBL Packet Capture library. This library also includes classes to access packet header fields.}
s.email = %q{fukusima@goto.info.waseda.ac.jp}
s.extensions = [%q{ext/extconf.rb}]
Please sign in to comment.
Something went wrong with that request. Please try again.