rdf-turtle 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/rdf/turtle/reader.rb +4 -7
  3. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.3.2
@@ -272,7 +272,7 @@ module RDF::Turtle
272
272
  debug(loc, *(data.dup << {:level => 0}))
273
273
  end
274
274
  end
275
- rescue RDF::LL1::Parser::Error => e
275
+ rescue ArgumentError, RDF::LL1::Parser::Error => e
276
276
  progress("Parsing completed with errors:\n\t#{e.message}")
277
277
  raise RDF::ReaderError, e.message if validate?
278
278
  end
@@ -298,12 +298,9 @@ module RDF::Turtle
298
298
  # @return [RDF::Statement] Added statement
299
299
  # @raise [RDF::ReaderError] Checks parameter types and raises if they are incorrect if parsing mode is _validate_.
300
300
  def add_statement(node, statement)
301
- if statement.valid?
302
- progress(node) {"generate statement: #{statement}"}
303
- @callback.call(statement)
304
- else
305
- error(node, "Statement is invalid: #{statement.inspect}")
306
- end
301
+ error(node, "Statement is invalid: #{statement.inspect}") unless statement.valid?
302
+ progress(node) {"generate statement: #{statement}"}
303
+ @callback.call(statement)
307
304
  end
308
305
 
309
306
  def process_iri(iri)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdf-turtle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: