renet 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/ext/renet/renet.c +1 -1
  2. data/lib/renet.rb +14 -10
  3. metadata +1 -1
@@ -30,7 +30,7 @@ void Init_renet()
30
30
  init_renet_connection();
31
31
  init_renet_server();
32
32
  rb_define_const(mENet, "ENET_VERSION", rb_str_new2("1.3.0"));
33
- rb_define_const(mENet, "RENET_VERSION", rb_str_new2("0.1.4"));
33
+ rb_define_const(mENet, "RENET_VERSION", rb_str_new2("0.1.5"));
34
34
  }
35
35
 
36
36
  VALUE renet_main_initialize(VALUE self)
@@ -1,10 +1,14 @@
1
- begin
2
- if defined? RUBY_VERSION and RUBY_VERSION[0..2] == '1.9' then
3
- version = '1.9'
4
- else
5
- version = '1.8'
6
- end
7
- require "#{File.dirname(__FILE__)}/renet.#{version}.so"
8
- rescue LoadError => e
9
- require "#{File.dirname(__FILE__)}/renet.bundle"
10
- end
1
+ if File.exists?("#{File.dirname(__FILE__)}/renet.bundle")
2
+ require "#{File.dirname(__FILE__)}/renet.bundle"
3
+ end
4
+
5
+ if File.exists?("#{File.dirname(__FILE__)}/renet.so")
6
+ require "#{File.dirname(__FILE__)}/renet.so"
7
+ end
8
+
9
+ if defined? RUBY_VERSION and RUBY_VERSION[0..2] == '1.9' then
10
+ version = '1.9'
11
+ else
12
+ version = '1.8'
13
+ end
14
+ require "#{File.dirname(__FILE__)}/renet.#{version}.so"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: renet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: