require 'open-uri'
print "Enter a URL"
add = gets
open(#{add}) do |f|
j = f.read.scan(/<img/)
jlen = j.length
puts jlen
end
是我有的代码。出于某种原因,红宝石给了我错误:findimages.rb:8: syntax error, unexpected kEND, expecting $end
这是为什么?
require 'open-uri'
print "Enter a URL"
add = gets
open(#{add}) do |f|
j = f.read.scan(/<img/)
jlen = j.length
puts jlen
end
是我有的代码。出于某种原因,红宝石给了我错误:findimages.rb:8: syntax error, unexpected kEND, expecting $end
这是为什么?