Skip to content

Instantly share code, notes, and snippets.

@ches
Created September 15, 2011 06:34
Show Gist options
  • Save ches/1218672 to your computer and use it in GitHub Desktop.
Save ches/1218672 to your computer and use it in GitHub Desktop.
Should ENV be trying File.path somewhere?
ruby-1.9.2-p290 :001 > require 'pathname'
=> true
ruby-1.9.2-p290 :002 > p = Pathname.new('/Users/ches')
=> #<Pathname:/Users/ches>
ruby-1.9.2-p290 :003 > ENV['foobar'] = p + 'src'
TypeError: can't convert Pathname into String
from (irb):3:in `[]='
from (irb):3
from /Users/ches/.rvm/rubies/ruby-1.9.2-p290/bin/irb:16:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment