jtor-stdlib 0.1.2-java → 0.1.3-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 23edc4304941a8c8b28d4ed49943f1c381c092cf
4
- data.tar.gz: 17f06f61a48310cc6cf8944451d844b7b736d550
3
+ metadata.gz: e83350fe555fd5b1c74ca926dfdbe203ef7f09f2
4
+ data.tar.gz: 23a1e40c02f00d3177a0eeb1f9aebdd9cce9b7ad
5
5
  SHA512:
6
- metadata.gz: dabbfe23ec0faceb3a6ec3d6a9920a9bdd8fc323b0d2f04484241ca89138673376f7ac7b402480ee5dab002260cbaf152d31dbcc7819a84639f001277dc8f617
7
- data.tar.gz: 54e182ce43ee02084b0a73f8b00eba09bf64657a46a8d6019d80d5d7aff7113590bcd8c21222bf522eac3f5b823fab52d6a58a43dc1646f77b4d563b189aaf85
6
+ metadata.gz: 030ad6a50c4bb8fad4194d4b8d8273a54da1fd9b01038ca5f99862f3392de19ce792f3cdf68554f3da7f0a373551f46cc2dd7db990ae4c4d12f1aecfd5c51d75
7
+ data.tar.gz: 749d3a27f0ac97f27c74ecdda710869e6e708754df44482f3f4e8d8419a0d484cc4a5364f100d2137e3bb60221d529d202e1664a6ab5e5d7c1bc30aad0efaeb6
@@ -3,9 +3,12 @@ module Jtor
3
3
  def jtor_import(import_string)
4
4
  packages = import_string.split('.')
5
5
  path = File.join(packages[0..-2], "#{packages.last}.rb")
6
- Dir[path].each { |p| require File.expand_path(p) }
7
- rescue LoadError
8
- java_import import_string
6
+ paths = Dir[path]
7
+ if paths.any?
8
+ paths.each { |p| require File.expand_path(p) }
9
+ else
10
+ java_import import_string
11
+ end
9
12
  end
10
13
  end
11
14
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jtor-stdlib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: java
6
6
  authors:
7
7
  - Alejandro Rodríguez