Created
September 27, 2011 03:23
-
-
Save ip2k/1244249 to your computer and use it in GitHub Desktop.
possible ruby bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'yaml' | |
hashy = Hash["a" => 100, "b" => 200] | |
puts hashy.inspect | |
YAML::dump(hashy, File.open('test.yaml', 'w')) | |
puts YAML::load_file('test.yaml') # attempt 1 | |
File.open( 'test.yaml' ) { |yf| puts YAML::load( yf ) } # attempt 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment