eventmachine-eventmachine 0.12.4 → 0.12.5

Sign up to get free protection for your applications and to get access to all the features.
data/ext/em.cpp CHANGED
@@ -674,7 +674,7 @@ SelectData_t::_Select
674
674
  int SelectData_t::_Select()
675
675
  {
676
676
  #ifdef HAVE_TBR
677
- rb_thread_blocking_region (_SelectDataSelect, (void*)this, RB_UBF_DFL, 0);
677
+ rb_thread_blocking_region (_SelectDataSelect, (void*)this, RUBY_UBF_IO, 0);
678
678
  return nSockets;
679
679
  #endif
680
680
 
@@ -762,7 +762,7 @@ bool EventMachine_t::_RunSelectOnce()
762
762
  //timeval tv = Quantum;
763
763
  SelectData.tv = Quantum;
764
764
  int s = SelectData._Select();
765
- //rb_thread_blocking_region(xxx,(void*)&SelectData,RB_UBF_DFL,0);
765
+ //rb_thread_blocking_region(xxx,(void*)&SelectData,RUBY_UBF_IO,0);
766
766
  //int s = EmSelect (SelectData.maxsocket+1, &(SelectData.fdreads), &(SelectData.fdwrites), NULL, &(SelectData.tv));
767
767
  //int s = SelectData.nSockets;
768
768
  if (s > 0) {
data/ext/em.h CHANGED
@@ -40,6 +40,11 @@ See the file COPYING for complete licensing information.
40
40
  #define TRAP_BEG
41
41
  #define TRAP_END
42
42
  #endif
43
+
44
+ // 1.9.0 compat
45
+ #ifndef RUBY_UDF_IO
46
+ #define RUBY_UDF_IO RB_UDF_DFL
47
+ #endif
43
48
  #else
44
49
  #define EmSelect select
45
50
  #endif
data/ext/extconf.rb CHANGED
@@ -34,7 +34,7 @@ require 'mkmf'
34
34
 
35
35
  add_define 'BUILD_FOR_RUBY'
36
36
  add_define 'HAVE_RBTRAP' if have_var('rb_trap_immediate', ['ruby.h', 'rubysig.h'])
37
- add_define "HAVE_TBR" if have_func('rb_thread_blocking_region') and have_macro('RB_UBF_DFL', 'ruby.h')
37
+ add_define "HAVE_TBR" if have_func('rb_thread_blocking_region')# and have_macro('RUBY_UBF_IO', 'ruby.h')
38
38
 
39
39
  # Minor platform details between *nix and Windows:
40
40
 
@@ -25,7 +25,7 @@
25
25
 
26
26
  module EventMachine
27
27
 
28
- VERSION = "0.12.4"
28
+ VERSION = "0.12.5"
29
29
 
30
30
  end
31
31
 
data/tasks/tests.rake CHANGED
@@ -26,7 +26,7 @@ desc "Run tests for #{Spec.name}."
26
26
  task :test do |t|
27
27
  # run_tests t
28
28
  # Rake +/ friends leave threads, etc, less stable test runs.
29
- ruby "-Ilib -Iext -Ijava tests/testem.rb #{'-v' if ENV['VERBOSE']}"
29
+ ruby "-Ilib -Iext -Iext/fastfilereader -Ijava tests/testem.rb #{'-v' if ENV['VERBOSE']}"
30
30
  end
31
31
 
32
32
  namespace :test do
@@ -51,7 +51,7 @@ namespace :test do
51
51
  "test_pure.rb",
52
52
  "test_running.rb",
53
53
  "test_sasl.rb",
54
- #"test_send_file.rb",
54
+ "test_send_file.rb",
55
55
  "test_servers.rb",
56
56
  "test_smtpclient.rb",
57
57
  "test_smtpserver.rb",
data/tests/test_epoll.rb CHANGED
@@ -61,7 +61,7 @@ class TestEpoll < Test::Unit::TestCase
61
61
  # On most systems, the default value is 1024.
62
62
  # Java doesn't (currently) implement this.
63
63
  def test_rlimit
64
- unless RUBY_PLATFORM =~ /java/
64
+ unless RUBY_PLATFORM =~ /java/ or EM.set_descriptor_table_size >= 1024
65
65
  a = EM.set_descriptor_table_size
66
66
  assert( a <= 1024 )
67
67
  a = EM.set_descriptor_table_size( 1024 )
@@ -27,10 +27,6 @@
27
27
  $:.unshift "../lib"
28
28
  require 'eventmachine'
29
29
 
30
- require 'test/unit/testsuite'
31
- require 'test/unit/ui/console/testrunner'
32
-
33
-
34
30
  class TestEventables < Test::Unit::TestCase
35
31
 
36
32
  class EvTest
@@ -68,6 +64,9 @@ end
68
64
  #--------------------------------------
69
65
 
70
66
  if __FILE__ == $0
67
+ require 'test/unit/testsuite'
68
+ require 'test/unit/ui/console/testrunner'
69
+
71
70
  runner = Test::Unit::UI::Console::TestRunner
72
71
  suite = Test::Unit::TestSuite.new("name")
73
72
  ObjectSpace.each_object(Class) do |testcase|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eventmachine-eventmachine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.4
4
+ version: 0.12.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francis Cianfrocca