Issue #4588 has been reported by Suraj Kurapati.

----------------------------------------
Bug #4588: exec(env, cmd) fails in Ruby 1.8; works in 1.9
http://redmine.ruby-lang.org/issues/4588

Author: Suraj Kurapati
Status: Open
Priority: Normal
Assignee: 
Category: core
Target version: Ruby 1.8.7
ruby -v: ruby 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux]


Passing a hash as the "env" parameter for exec() fails in Ruby 1.8:

 # ruby -ve 'exec({"HELLO"=>"WORLD"}, "ruby", "-ve", "puts ENV[%q(HELLO)]")'
 ruby 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux]
 -e:1:in `exec': can't convert Hash into String (TypeError)
 	from -e:1

In contrast, it works correctly in Ruby 1.9:

 # ruby -ve 'exec({"HELLO"=>"WORLD"}, "ruby", "-ve", "puts ENV[%q(HELLO)]")'
 ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux]
 ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux]
 WORLD

Thanks for your consideration.


-- 
http://redmine.ruby-lang.org