This file contains hidden or 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 'csv' | |
require 'yaml' | |
require 'json' | |
csv =<<EOF | |
id,name,price | |
A1,apple,100 | |
A2,grape,300 |
This file contains hidden or 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
➜ ~ rbenv global 1.9.3-p286 | |
➜ ~ rbenv rehash | |
➜ ~ gem install pry | |
Fetching: coderay-1.0.8.gem (100%) | |
Fetching: slop-3.4.3.gem (100%) | |
Fetching: method_source-0.8.1.gem (100%) | |
Fetching: pry-0.9.11.4.gem (100%) | |
Successfully installed coderay-1.0.8 | |
Successfully installed slop-3.4.3 | |
Successfully installed method_source-0.8.1 |
This file contains hidden or 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
[73] pry(main)> (1..100).step(1).to_a.each{|n| warn n if n==100} | |
100 | |
=> [1, | |
2, | |
3, | |
4, | |
5, | |
: #ダンプ出力があふれてpagerが立ち上がる | |
--------------------- | |
[74] pry(main)> (1..100).step(1).to_a.each{|n| warn n if n==100}; |
NewerOlder