зеркало из https://github.com/github/ruby.git
fix typo by @daveworth [fix GH-340]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
8dcdfe36b7
Коммит
6dede51159
|
@ -1,5 +1,5 @@
|
||||||
# word occurrence listing
|
# word occurrence listing
|
||||||
# usege: ruby freq.rb file..
|
# usage: ruby freq.rb file..
|
||||||
freq = Hash.new(0)
|
freq = Hash.new(0)
|
||||||
while line = gets()
|
while line = gets()
|
||||||
line.scan(/\w+/) do |word|
|
line.scan(/\w+/) do |word|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# word occurrence listing
|
# word occurrence listing
|
||||||
# usege: ruby occur.rb file..
|
# usage: ruby occur.rb file..
|
||||||
freq = Hash.new(0)
|
freq = Hash.new(0)
|
||||||
while line = gets()
|
while line = gets()
|
||||||
for word in line.split(/\W+/)
|
for word in line.split(/\W+/)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# word occurrence listing
|
# word occurrence listing
|
||||||
# usege: ruby occur2.rb file..
|
# usage: ruby occur2.rb file..
|
||||||
freq = {}
|
freq = {}
|
||||||
ARGF.each_line do |line|
|
ARGF.each_line do |line|
|
||||||
for word in line.split(/\W+/)
|
for word in line.split(/\W+/)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче