Matthew Kerwin wrote in post #1133419:
> Arun kant sharma wrote in post #1133323:
>> It would be
>> ENV['PATH'] = '/newpath' + ENV['PATH']
>> and it is as easy as it can get. Not aware about any method like +=.
>
> It isn't a method; `a += b' is syntactic sugar for `a = a + b'
>
> And you forgot the path separator:
>
>   ENV['PATH'] = '/newpath:' + ENV['PATH']

Yes, but I just want to know whether there is more elegant way without
writing ENV['PATH'] twice.

-- 
Posted via http://www.ruby-forum.com/.