class2 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changes +4 -0
- data/lib/class2.rb +4 -1
- data/lib/class2/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61dc3c545f0d85bb351f739def887860fa1ae4b4
|
4
|
+
data.tar.gz: 60ccf0018c8d307435c061921ecd75ebb9fed97b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb86ad32514cb49fbfb5e094d9ca3a5f71c2713183439093c6b44cbc2e98c81ebed982a687a050bbdae6a55f85fdd845ee0477b9752d2df8bd4dc9320978afc9
|
7
|
+
data.tar.gz: ea05449a79eb2f1e0c42469c34a72ab660303b740386128295f020c9ed9a31708dccf09ca89c687ebf416c5aca15f338d824827fc82102ce93a7cf94f6cc7c4c
|
data/Changes
CHANGED
data/lib/class2.rb
CHANGED
@@ -61,9 +61,11 @@ class Class2
|
|
61
61
|
def autoload(namespace = Object) # :nodoc:
|
62
62
|
failure = lambda { |message| abort "class2: cannot autoload class definitions: #{message}" }
|
63
63
|
failure["cannot find the right caller"] unless caller.find do |line|
|
64
|
-
|
64
|
+
# Ignore our autoload file and require()
|
65
|
+
line.index("/class2/autoload.rb:").nil? && line.index("/kernel_require.rb:").nil? && line =~ /(.+):\d+:in\s+`\S/
|
65
66
|
end
|
66
67
|
|
68
|
+
# Give this precedence over global DATA constant
|
67
69
|
data = String.new
|
68
70
|
File.open($1) do |io|
|
69
71
|
while line = io.gets
|
@@ -73,6 +75,7 @@ class Class2
|
|
73
75
|
end
|
74
76
|
end
|
75
77
|
|
78
|
+
# Fallback to global constant if nothing found
|
76
79
|
data = ::DATA.read if data.empty? && defined?(::DATA)
|
77
80
|
failure["no data section found"] if data.empty?
|
78
81
|
|
data/lib/class2/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: class2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Skye Shaw
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-06-
|
11
|
+
date: 2018-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|