Skip to content
Permalink
Browse files
Merge remote-tracking branch 'origin/master' into update_stdlib
  • Loading branch information
headius committed Nov 4, 2014
2 parents 668a4bd + 1df19df commit 822abecdd0ceba65f36869ff3af2bd92e4429141
Showing 1 changed file with 8 additions and 0 deletions.
@@ -22,6 +22,14 @@ def java_import(*import_classes)
import_classes.map do |import_class|
case import_class
when String
cc = java.lang.Character
valid_name = import_class.split(".").all? do |frag|
cc.java_identifier_start? frag[0].ord and
frag.each_char.all? {|c| cc.java_identifier_part? c.ord }
end
unless valid_name
raise ArgumentError.new "not a valid Java identifier: #{import_class}"
end
# pull in the class
import_class = JavaUtilities.get_proxy_class(import_class)
when Module

0 comments on commit 822abec

Please sign in to comment.