Skip to content

Commit

Permalink
Enhanced RDF::Reader.open to support loading data from URLs.
Browse files Browse the repository at this point in the history
  • Loading branch information
artob committed Mar 26, 2010
1 parent a74f90c commit 5b96442
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/rdf.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require 'open-uri'
require 'rdf/version'

module RDF
Expand Down
2 changes: 1 addition & 1 deletion lib/rdf/reader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class << self
# @yieldparam [Reader]
# @raise [FormatError] if no reader available for the specified format
def self.open(filename, options = {}, &block)
File.open(filename, 'rb') do |file|
Kernel.open(filename, 'rb') do |file|
if reader = self.for(options[:format] || filename)
reader.new(file, options, &block)
else
Expand Down

0 comments on commit 5b96442

Please sign in to comment.