polyglot 0.2.8 → 0.2.9
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/Rakefile +1 -1
- data/lib/polyglot.rb +4 -2
- data/lib/polyglot/version.rb +1 -1
- metadata +2 -2
data/History.txt
CHANGED
data/Rakefile
CHANGED
data/lib/polyglot.rb
CHANGED
@@ -4,6 +4,8 @@ require 'pathname'
|
|
4
4
|
module Polyglot
|
5
5
|
@registrations ||= {} # Guard against reloading
|
6
6
|
@loaded ||= {}
|
7
|
+
|
8
|
+
class PolyglotLoadError < LoadError; end
|
7
9
|
|
8
10
|
class NestedLoadError < LoadError
|
9
11
|
def initialize le
|
@@ -27,7 +29,7 @@ module Polyglot
|
|
27
29
|
(is_absolute ? [""] : $:).each{|lib|
|
28
30
|
base = is_absolute ? "" : lib+File::SEPARATOR
|
29
31
|
# In Windows, repeated SEPARATOR chars have a special meaning, avoid adding them
|
30
|
-
matches = Dir[base+file+".{"+extensions+"}"]
|
32
|
+
matches = Dir[(base+file+".{"+extensions+"}").to_s]
|
31
33
|
# Revisit: Should we do more do if more than one candidate found?
|
32
34
|
$stderr.puts "Polyglot: found more than one candidate for #{file}: #{matches*", "}" if matches.size > 1
|
33
35
|
if path = matches[0]
|
@@ -54,7 +56,7 @@ module Polyglot
|
|
54
56
|
if defined?(MissingSourceFile)
|
55
57
|
raise MissingSourceFile.new(msg, file)
|
56
58
|
else
|
57
|
-
raise
|
59
|
+
raise PolyglotLoadError.new(msg)
|
58
60
|
end
|
59
61
|
end
|
60
62
|
end
|
data/lib/polyglot/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: polyglot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Clifford Heath
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-09-13 00:00:00 +10:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|