saxaphone 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/saxaphone/util.rb +11 -1
- metadata +3 -3
data/lib/saxaphone/util.rb
CHANGED
@@ -7,10 +7,20 @@ module Saxaphone
|
|
7
7
|
|
8
8
|
constant = Object
|
9
9
|
names.each do |name|
|
10
|
-
constant =
|
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.
|
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: &
|
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: *
|
24
|
+
version_requirements: *70243549160060
|
25
25
|
description: Use objects
|
26
26
|
email: developer@matthewhiggins.com
|
27
27
|
executables: []
|