eventmachine-le 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/ext/rubymain.cpp +22 -22
  2. data/lib/em/version.rb +1 -1
  3. metadata +8 -8
data/ext/rubymain.cpp CHANGED
@@ -253,7 +253,7 @@ static VALUE t_start_server (VALUE self, VALUE server, VALUE port)
253
253
  {
254
254
  const unsigned long f = evma_create_tcp_server (StringValuePtr(server), FIX2INT(port));
255
255
  if (!f)
256
- rb_raise (rb_eRuntimeError, "no acceptor (port is in use or requires root privileges)");
256
+ rb_raise (rb_eRuntimeError, "%s", "no acceptor (port is in use or requires root privileges)");
257
257
  return ULONG2NUM (f);
258
258
  }
259
259
 
@@ -276,7 +276,7 @@ static VALUE t_start_unix_server (VALUE self, VALUE filename)
276
276
  {
277
277
  const unsigned long f = evma_create_unix_domain_server (StringValuePtr(filename));
278
278
  if (!f)
279
- rb_raise (rb_eRuntimeError, "no unix-domain acceptor");
279
+ rb_raise (rb_eRuntimeError, "%s", "no unix-domain acceptor");
280
280
  return ULONG2NUM (f);
281
281
  }
282
282
 
@@ -473,7 +473,7 @@ static VALUE t_send_datagram (VALUE self, VALUE signature, VALUE data, VALUE dat
473
473
  {
474
474
  int b = evma_send_datagram (NUM2ULONG (signature), StringValuePtr (data), FIX2INT (data_length), StringValuePtr(address), FIX2INT(port));
475
475
  if (b < 0)
476
- rb_raise (EM_eConnectionError, "error in sending datagram"); // FIXME: this could be more specific.
476
+ rb_raise (EM_eConnectionError, "%s", "error in sending datagram"); // FIXME: this could be more specific.
477
477
  return INT2NUM (b);
478
478
  }
479
479
 
@@ -513,10 +513,10 @@ static VALUE t_connect_server (VALUE self, VALUE server, VALUE port)
513
513
  try {
514
514
  const unsigned long f = evma_connect_to_server (NULL, 0, StringValuePtr(server), NUM2INT(port));
515
515
  if (!f)
516
- rb_raise (EM_eConnectionError, "no connection");
516
+ rb_raise (EM_eConnectionError, "%s", "no connection");
517
517
  return ULONG2NUM (f);
518
518
  } catch (std::runtime_error e) {
519
- rb_raise (EM_eConnectionError, e.what(), "%s");
519
+ rb_raise (EM_eConnectionError, "%s", e.what());
520
520
  }
521
521
  return Qnil;
522
522
  }
@@ -534,10 +534,10 @@ static VALUE t_bind_connect_server (VALUE self, VALUE bind_addr, VALUE bind_port
534
534
  try {
535
535
  const unsigned long f = evma_connect_to_server (StringValuePtr(bind_addr), NUM2INT(bind_port), StringValuePtr(server), NUM2INT(port));
536
536
  if (!f)
537
- rb_raise (EM_eConnectionError, "no connection");
537
+ rb_raise (EM_eConnectionError, "%s", "no connection");
538
538
  return ULONG2NUM (f);
539
539
  } catch (std::runtime_error e) {
540
- rb_raise (EM_eConnectionError, e.what(), "%s");
540
+ rb_raise (EM_eConnectionError, "%s", e.what());
541
541
  }
542
542
  return Qnil;
543
543
  }
@@ -550,7 +550,7 @@ static VALUE t_connect_unix_server (VALUE self, VALUE serversocket)
550
550
  {
551
551
  const unsigned long f = evma_connect_to_unix_server (StringValuePtr(serversocket));
552
552
  if (!f)
553
- rb_raise (rb_eRuntimeError, "no connection");
553
+ rb_raise (rb_eRuntimeError, "%s", "no connection");
554
554
  return ULONG2NUM (f);
555
555
  }
556
556
 
@@ -562,7 +562,7 @@ static VALUE t_attach_fd (VALUE self, VALUE file_descriptor, VALUE watch_mode)
562
562
  {
563
563
  const unsigned long f = evma_attach_fd (NUM2INT(file_descriptor), watch_mode == Qtrue);
564
564
  if (!f)
565
- rb_raise (rb_eRuntimeError, "no connection");
565
+ rb_raise (rb_eRuntimeError, "%s", "no connection");
566
566
  return ULONG2NUM (f);
567
567
  }
568
568
 
@@ -583,7 +583,7 @@ static VALUE t_attach_server_fd (VALUE self, VALUE file_descriptor, VALUE watch_
583
583
  {
584
584
  const unsigned long f = evma_attach_server_fd (NUM2INT(file_descriptor));
585
585
  if (!f)
586
- rb_raise (rb_eRuntimeError, "no connection");
586
+ rb_raise (rb_eRuntimeError, "%s", "no connection");
587
587
  return ULONG2NUM (f);
588
588
  }
589
589
 
@@ -734,7 +734,7 @@ static VALUE t_open_udp_socket (VALUE self, VALUE server, VALUE port)
734
734
  {
735
735
  const unsigned long f = evma_open_datagram_socket (StringValuePtr(server), FIX2INT(port));
736
736
  if (!f)
737
- rb_raise (rb_eRuntimeError, "no datagram socket");
737
+ rb_raise (rb_eRuntimeError, "%s", "no datagram socket");
738
738
  return ULONG2NUM (f);
739
739
  }
740
740
 
@@ -816,7 +816,7 @@ static VALUE t_invoke_popen (VALUE self, VALUE cmd)
816
816
  int len = RARRAY (cmd)->len;
817
817
  #endif
818
818
  if (len >= 2048)
819
- rb_raise (rb_eRuntimeError, "too many arguments to popen");
819
+ rb_raise (rb_eRuntimeError, "%s", "too many arguments to popen");
820
820
  char *strings [2048];
821
821
  for (int i=0; i < len; i++) {
822
822
  VALUE ix = INT2FIX (i);
@@ -845,7 +845,7 @@ static VALUE t_read_keyboard (VALUE self)
845
845
  {
846
846
  const unsigned long f = evma_open_keyboard();
847
847
  if (!f)
848
- rb_raise (rb_eRuntimeError, "no keyboard reader");
848
+ rb_raise (rb_eRuntimeError, "%s", "no keyboard reader");
849
849
  return ULONG2NUM (f);
850
850
  }
851
851
 
@@ -859,7 +859,7 @@ static VALUE t_watch_filename (VALUE self, VALUE fname)
859
859
  try {
860
860
  return ULONG2NUM(evma_watch_filename(StringValuePtr(fname)));
861
861
  } catch (std::runtime_error e) {
862
- rb_raise (EM_eUnsupported, e.what(), "%s");
862
+ rb_raise (EM_eUnsupported, "%s", e.what());
863
863
  }
864
864
  return Qnil;
865
865
  }
@@ -885,7 +885,7 @@ static VALUE t_watch_pid (VALUE self, VALUE pid)
885
885
  try {
886
886
  return ULONG2NUM(evma_watch_pid(NUM2INT(pid)));
887
887
  } catch (std::runtime_error e) {
888
- rb_raise (EM_eUnsupported, e.what(), "%s");
888
+ rb_raise (EM_eUnsupported, "%s", e.what());
889
889
  }
890
890
  return Qnil;
891
891
  }
@@ -932,7 +932,7 @@ t__epoll_set
932
932
  static VALUE t__epoll_set (VALUE self, VALUE val)
933
933
  {
934
934
  if (t__epoll_p(self) == Qfalse)
935
- rb_raise (EM_eUnsupported, "epoll is not supported on this platform");
935
+ rb_raise (EM_eUnsupported, "%s", "epoll is not supported on this platform");
936
936
 
937
937
  evma_set_epoll (val == Qtrue ? 1 : 0);
938
938
  return val;
@@ -969,7 +969,7 @@ t__kqueue_set
969
969
  static VALUE t__kqueue_set (VALUE self, VALUE val)
970
970
  {
971
971
  if (t__kqueue_p(self) == Qfalse)
972
- rb_raise (EM_eUnsupported, "kqueue is not supported on this platform");
972
+ rb_raise (EM_eUnsupported, "%s", "kqueue is not supported on this platform");
973
973
 
974
974
  evma_set_kqueue (val == Qtrue ? 1 : 0);
975
975
  return val;
@@ -1007,7 +1007,7 @@ static VALUE t_send_file_data (VALUE self, VALUE signature, VALUE filename)
1007
1007
 
1008
1008
  int b = evma_send_file_data_to_connection (NUM2ULONG (signature), StringValuePtr(filename));
1009
1009
  if (b == -1)
1010
- rb_raise(rb_eRuntimeError, "File too large. send_file_data() supports files under 32k.");
1010
+ rb_raise(rb_eRuntimeError, "%s", "File too large. send_file_data() supports files under 32k.");
1011
1011
  if (b > 0) {
1012
1012
  char *err = strerror (b);
1013
1013
  char buf[1024];
@@ -1085,7 +1085,7 @@ static VALUE t_start_proxy (VALUE self, VALUE from, VALUE to, VALUE bufsize, VAL
1085
1085
  try {
1086
1086
  evma_start_proxy(NUM2ULONG (from), NUM2ULONG (to), NUM2ULONG(bufsize), NUM2ULONG(length));
1087
1087
  } catch (std::runtime_error e) {
1088
- rb_raise (EM_eConnectionError, e.what(), "%s");
1088
+ rb_raise (EM_eConnectionError, "%s", e.what());
1089
1089
  }
1090
1090
  return Qnil;
1091
1091
  }
@@ -1100,7 +1100,7 @@ static VALUE t_stop_proxy (VALUE self, VALUE from)
1100
1100
  try{
1101
1101
  evma_stop_proxy(NUM2ULONG (from));
1102
1102
  } catch (std::runtime_error e) {
1103
- rb_raise (EM_eConnectionError, e.what(), "%s");
1103
+ rb_raise (EM_eConnectionError, "%s", e.what());
1104
1104
  }
1105
1105
  return Qnil;
1106
1106
  }
@@ -1114,7 +1114,7 @@ static VALUE t_proxied_bytes (VALUE self, VALUE from)
1114
1114
  try{
1115
1115
  return ULONG2NUM(evma_proxied_bytes(NUM2ULONG (from)));
1116
1116
  } catch (std::runtime_error e) {
1117
- rb_raise (EM_eConnectionError, e.what(), "%s");
1117
+ rb_raise (EM_eConnectionError, "%s", e.what());
1118
1118
  }
1119
1119
  return Qnil;
1120
1120
  }
@@ -1139,7 +1139,7 @@ static VALUE t_get_idle_time (VALUE self, VALUE from)
1139
1139
  return Qnil;
1140
1140
  }
1141
1141
  } catch (std::runtime_error e) {
1142
- rb_raise (EM_eConnectionError, e.what(), "%s");
1142
+ rb_raise (EM_eConnectionError, "%s", e.what());
1143
1143
  }
1144
1144
  return Qnil;
1145
1145
  }
data/lib/em/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module EventMachine
2
- VERSION = "1.1.1"
2
+ VERSION = "1.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eventmachine-le
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,11 +11,11 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-07-12 00:00:00.000000000 Z
14
+ date: 2012-07-13 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rake-compiler
18
- requirement: &21749960 !ruby/object:Gem::Requirement
18
+ requirement: &10365700 !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
21
  - - ! '>='
@@ -23,10 +23,10 @@ dependencies:
23
23
  version: 0.7.9
24
24
  type: :development
25
25
  prerelease: false
26
- version_requirements: *21749960
26
+ version_requirements: *10365700
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: yard
29
- requirement: &21749500 !ruby/object:Gem::Requirement
29
+ requirement: &10365240 !ruby/object:Gem::Requirement
30
30
  none: false
31
31
  requirements:
32
32
  - - ! '>='
@@ -34,10 +34,10 @@ dependencies:
34
34
  version: 0.7.2
35
35
  type: :development
36
36
  prerelease: false
37
- version_requirements: *21749500
37
+ version_requirements: *10365240
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: bluecloth
40
- requirement: &21748940 !ruby/object:Gem::Requirement
40
+ requirement: &10364860 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
43
  - - ! '>='
@@ -45,7 +45,7 @@ dependencies:
45
45
  version: '0'
46
46
  type: :development
47
47
  prerelease: false
48
- version_requirements: *21748940
48
+ version_requirements: *10364860
49
49
  description: ! 'EventMachine-LE (Live Edition) is a branch of EventMachine (https://github.com/eventmachine/eventmachine).
50
50
 
51
51