RuntimeError handling

require ‘open-uri’
open(“”) do |f|
f.each_line { |line| p line }

When I run this code,$ruby ex_libraries.rb. I’m seeing the error as,
C:/Ruby193/lib/ruby/1.9.1/open-uri.rb:216:in open_loop': redirection forbidden: -> (RuntimeError) from C:/Ruby193/lib/ruby/1.9.1/open-uri.rb:146:inopen_uri’
from C:/Ruby193/lib/ruby/1.9.1/open-uri.rb:677:in open' from C:/Ruby193/lib/ruby/1.9.1/open-uri.rb:33:inopen’
from ex_libraries.rb:4:in `’

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs