Revisions
-
sorah revised this gist
Jul 7, 2012 . 1 changed file with 9 additions and 6 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,15 +1,18 @@ #/usr/bin/env ruby # coding: utf-8 # ^ coding: is correct def foooo File.open(ARGV[0]){|f| f.each do |line| # Don't use "unless-else-end" if /fo+/i =~ line print "foooo" else # should be abort? abort "Error" end end puts # use puts with no argument to return } end -
raa0121 revised this gist
Jun 7, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ def foooo File::open(ARGV[0]){|f| f.each do |line| unless(/fo+/i =~ line) print "Error" else print "foooo" -
raa0121 revised this gist
Jun 7, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ def foooo unless(/fo.*/i =~ line) print "Error" else print "foooo" end end print "\n" -
raa0121 revised this gist
Jun 7, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ def foooo File::open(ARGV[0]){|f| f.each do |line| unless(/fo.*/i =~ line) print "Error" else print "fooo" -
raa0121 revised this gist
Jun 6, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -13,4 +13,4 @@ def foooo } end foooo -
raa0121 revised this gist
Jun 6, 2012 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ #/usr/bin/env ruby # code:utf-8 def foooo File::open(ARGV[0]){|f| f.each do |line| -
raa0121 renamed this gist
Jun 6, 2012 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ def foooo File::open(ARGV[0]){|f| f.each do |line| unless(/fo.*+/i =~ line) @@ -11,4 +11,4 @@ def fooo } end fooo -
raa0121 revised this gist
Jun 6, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ def fooo File::open(ARGV[0]){|f| f.each do |line| unless(/fo.*+/i =~ line) -
raa0121 created this gist
Jun 6, 2012 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ def foo File::open(ARGV[0]){|f| f.each do |line| unless(/fo.*+/i =~ line) print "Error" else print "fooo" end end print "\n" } end foo