Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Rescue RuntimeError when trying to load Actor lib

rubinius-actor will install on CRuby but will raise a RuntimeError when
required. Rescue to load our version.
  • Loading branch information...
commit e927d9eb6c59ac0eeb336772b9a3c6bf5768ef03 1 parent 216187e
@jc00ke jc00ke authored
Showing with 4 additions and 4 deletions.
  1. +0 −1  Gemfile
  2. +1 −0  girl_friday.gemspec
  3. +3 −3 lib/girl_friday.rb
View
1  Gemfile
@@ -2,7 +2,6 @@ source "http://rubygems.org"
# Specify your gem's dependencies in girl_friday.gemspec
gemspec
-gem 'rubinius-actor', :platforms => [:rbx, :jruby]
# Needed for testing only!
gem 'minitest'
View
1  girl_friday.gemspec
@@ -17,6 +17,7 @@ Gem::Specification.new do |s|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]
s.add_dependency 'connection_pool', '~> 0.9.0'
+ s.add_dependency 'rubinius-actor'
s.add_development_dependency 'sinatra', '~> 1.3'
s.add_development_dependency 'rake'
end
View
6 lib/girl_friday.rb
@@ -10,10 +10,10 @@
begin
# Rubinius or JRuby
require 'rubinius/actor'
- require 'girl_friday/monkey_patches'
GirlFriday::WorkQueue::Actor = Rubinius::Actor
-rescue LoadError
- # Others
+rescue RuntimeError
+ # Rubinius::Actor will raise a RuntimeError when
+ # required on !(Rubinius || JRuby)
require 'girl_friday/actor'
end

3 comments on commit e927d9e

@mperham
Owner

Does this need a new 0.11.1 release?

@jc00ke
Collaborator

Sure, I'll tag and push shortly if you want.

@mperham
Owner
Please sign in to comment.
Something went wrong with that request. Please try again.