atomic 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/atomic.gemspec +3 -3
- data/lib/atomic.rb +10 -1
- metadata +7 -7
data/atomic.gemspec
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{atomic}
|
5
|
-
s.version = "0.0.
|
5
|
+
s.version = "0.0.8"
|
6
6
|
s.authors = ["Charles Oliver Nutter", "MenTaLguY"]
|
7
7
|
s.date = Time.now.strftime('%Y-%m-%d')
|
8
|
-
s.description = "An atomic reference implementation for JRuby and
|
8
|
+
s.description = "An atomic reference implementation for JRuby, Rubinius, and MRI"
|
9
9
|
s.email = ["headius@headius.com", "mental@rydia.net"]
|
10
10
|
s.homepage = "http://github.com/headius/ruby-atomic"
|
11
11
|
s.require_paths = ["lib"]
|
12
|
-
s.summary = "An atomic reference implementation for JRuby and
|
12
|
+
s.summary = "An atomic reference implementation for JRuby, Rubinius, and MRI"
|
13
13
|
s.test_files = Dir["test/test*.rb"]
|
14
14
|
if defined?(JRUBY_VERSION)
|
15
15
|
s.files = Dir['{lib,examples,test}/**/*'] + Dir['{*.txt,*.gemspec,Rakefile}']
|
data/lib/atomic.rb
CHANGED
@@ -55,8 +55,17 @@ class Atomic
|
|
55
55
|
end
|
56
56
|
|
57
57
|
begin
|
58
|
-
|
58
|
+
ruby_engine = defined?(RUBY_ENGINE)? RUBY_ENGINE : 'ruby'
|
59
|
+
case ruby_engine
|
60
|
+
when 'jruby', 'ruby'
|
61
|
+
require 'atomic_reference'
|
62
|
+
when 'rbx'
|
63
|
+
Atomic::InternalReference = Rubinius::AtomicReference
|
64
|
+
else
|
65
|
+
raise LoadError
|
66
|
+
end
|
59
67
|
rescue LoadError
|
68
|
+
warn 'unsupported Ruby engine, using less-efficient Atomic impl'
|
60
69
|
# Portable/generic (but not very memory or scheduling-efficient) fallback
|
61
70
|
class Atomic::InternalReference #:nodoc: all
|
62
71
|
def initialize(value)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: atomic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 8
|
10
|
+
version: 0.0.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Charles Oliver Nutter
|
@@ -16,10 +16,10 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-11-
|
19
|
+
date: 2011-11-29 00:00:00 Z
|
20
20
|
dependencies: []
|
21
21
|
|
22
|
-
description: An atomic reference implementation for JRuby and
|
22
|
+
description: An atomic reference implementation for JRuby, Rubinius, and MRI
|
23
23
|
email:
|
24
24
|
- headius@headius.com
|
25
25
|
- mental@rydia.net
|
@@ -72,9 +72,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements: []
|
73
73
|
|
74
74
|
rubyforge_project:
|
75
|
-
rubygems_version: 1.8.
|
75
|
+
rubygems_version: 1.8.5
|
76
76
|
signing_key:
|
77
77
|
specification_version: 3
|
78
|
-
summary: An atomic reference implementation for JRuby and
|
78
|
+
summary: An atomic reference implementation for JRuby, Rubinius, and MRI
|
79
79
|
test_files:
|
80
80
|
- test/test_atomic.rb
|