J
Jos Backus
$ cat x
#!/usr/bin/env ruby
class << ENV
define_method[], lambda { |v| v.upcase })
end
p ENV['FOO']
$ FOO=foo ./x
"FOO"
$
But what if I want to call the original ENV[] inside the new method?
#!/usr/bin/env ruby
class << ENV
define_method[], lambda { |v| v.upcase })
end
p ENV['FOO']
$ FOO=foo ./x
"FOO"
$
But what if I want to call the original ENV[] inside the new method?