execjs 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/execjs/external_runtime.rb +2 -2
  2. metadata +4 -4
@@ -113,7 +113,7 @@ module ExecJS
113
113
 
114
114
  def which(command)
115
115
  Array(command).each do |name|
116
- name = name.split(/\s+/).first
116
+ name, args = name.split(/\s+/, 2)
117
117
  result = if ExecJS.windows?
118
118
  `#{ExecJS.root}/support/which.bat #{name}`
119
119
  else
@@ -121,7 +121,7 @@ module ExecJS
121
121
  end
122
122
 
123
123
  if path = result.strip.split("\n").first
124
- return path
124
+ return args ? "#{path} #{args}" : path
125
125
  end
126
126
  end
127
127
  nil
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: execjs
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 1
10
- version: 0.3.1
9
+ - 2
10
+ version: 0.3.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sam Stephenson
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-05-03 00:00:00 -07:00
19
+ date: 2011-05-05 00:00:00 -05:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency