opener-tokenizer 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/opener/tokenizer/version.rb +1 -1
- data/lib/opener/tokenizer.rb +5 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8068efdaddd2e39be5e79f112fe510642b897108
|
4
|
+
data.tar.gz: bd2f22620b4a8c113f90862ad8343a7cef975e26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b99b7903356298ffc99277e8baa8fef0fcba90fcc9532215a68165c7c2fcfdc1c6d6e1a866e57c81bd093f67eed95e6debb9daf5978906e2f782c76794374e0c
|
7
|
+
data.tar.gz: 58aaeade92a450c148530ef56cbc48f73fea4507be4180686cac18578863d07409a972812b354fefb55bd88a8bc8461ad1e080cce0c4518f235cc8ba77f714d6
|
data/lib/opener/tokenizer.rb
CHANGED
@@ -64,7 +64,11 @@ module Opener
|
|
64
64
|
else
|
65
65
|
language = options[:language]
|
66
66
|
end
|
67
|
-
|
67
|
+
|
68
|
+
unless valid_language?(language)
|
69
|
+
raise ArgumentError, "The specified language (#{language}) is invalid"
|
70
|
+
end
|
71
|
+
|
68
72
|
kernel = language_constant(language).new(:args => options[:args])
|
69
73
|
|
70
74
|
return Open3.capture3(*kernel.command.split(" "), :stdin_data => input)
|