saxaphone 0.5.0 → 0.5.1

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 (2) hide show
  1. data/lib/saxaphone/util.rb +11 -1
  2. metadata +3 -3
@@ -7,10 +7,20 @@ module Saxaphone
7
7
 
8
8
  constant = Object
9
9
  names.each do |name|
10
- constant = constant.const_defined?(name, false) ? constant.const_get(name) : constant.const_missing(name)
10
+ constant = standardized_const_defined?(constant, name) ? constant.const_get(name) : constant.const_missing(name)
11
11
  end
12
12
  constant
13
13
  end
14
+
15
+ if Module.method(:const_defined?).arity == 1
16
+ def standardized_const_defined?(constant, name)
17
+ constant.const_defined?(name)
18
+ end
19
+ else
20
+ def standardized_const_defined?(constant, name)
21
+ constant.const_defined?(name, false)
22
+ end
23
+ end
14
24
  end
15
25
  end
16
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: saxaphone
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-03-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
16
- requirement: &70237081767980 !ruby/object:Gem::Requirement
16
+ requirement: &70243549160060 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70237081767980
24
+ version_requirements: *70243549160060
25
25
  description: Use objects
26
26
  email: developer@matthewhiggins.com
27
27
  executables: []