We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0e8db6e commit 3969bdfCopy full SHA for 3969bdf
2 files changed
lib/rdf/model/uri.rb
@@ -141,8 +141,8 @@ def self.cache
141
#
142
# (see #initialize)
143
# @return [RDF::URI] an immutable, frozen URI object
144
- def self.intern(str, *args)
145
- (cache[(str = str.to_s).to_sym] ||= self.new(str, *args)).freeze
+ def self.intern(str, *args, **options)
+ (cache[(str = str.to_s).to_sym] ||= self.new(str, *args, **options)).freeze
146
end
147
148
##
spec/model_uri_spec.rb
@@ -17,6 +17,10 @@
17
expect(RDF::URI.intern("a")).to be_frozen
18
19
20
+ it "freezes an instance with options" do
21
+ expect(RDF::URI.intern("http://example.org/", validate: true)).to be_frozen
22
+ end
23
+
24
it "does not use #to_hash given a URI" do
25
expect {RDF::URI.intern(RDF::URI("a"))}.not_to write.to(:error)
26
0 commit comments