diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d80d483..17e4f88 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ['3.0', 3.1, 3.2, ruby-head, jruby] + ruby: ['3.0', 3.1, 3.2, 3.3, ruby-head, jruby] steps: - name: Clone repository uses: actions/checkout@v3 @@ -40,6 +40,6 @@ jobs: run: ruby --version; bundle exec rspec spec || $ALLOW_FAILURES - name: Coveralls GitHub Action uses: coverallsapp/github-action@v2 - if: "matrix.ruby == '3.2'" + if: "matrix.ruby == '3.3'" with: github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/lib/rdf/n3/reader.rb b/lib/rdf/n3/reader.rb index 8149ed0..38cc1ee 100644 --- a/lib/rdf/n3/reader.rb +++ b/lib/rdf/n3/reader.rb @@ -826,6 +826,8 @@ def ns(prefix = nil, suffix = nil) namespace(nil, iri("#{base_uri}#")) if prefix.nil? && !prefix(nil) base = prefix(prefix).to_s + suffix = suffix.gsub(PN_LOCAL_ESC) {|esc| esc[1]} if + suffix.match?(PN_LOCAL_ESC) suffix = suffix.to_s.sub(/^\#/, "") if base.index("#") iri(base + suffix.to_s) end diff --git a/rdf-n3.gemspec b/rdf-n3.gemspec index 18f99b0..be11b5d 100755 --- a/rdf-n3.gemspec +++ b/rdf-n3.gemspec @@ -28,11 +28,12 @@ Gem::Specification.new do |gem| gem.required_ruby_version = '>= 3.0' gem.requirements = [] - gem.add_dependency 'ebnf', '~> 2.5' - gem.add_dependency 'rdf', '~> 3.3' - gem.add_dependency 'sparql', '~> 3.3' + gem.add_runtime_dependency 'ebnf', '~> 2.5' + gem.add_runtime_dependency 'rdf', '~> 3.3' + gem.add_runtime_dependency 'sparql', '~> 3.3' gem.add_runtime_dependency 'sxp', '~> 2.0' + gem.add_development_dependency 'getoptlong', '~> 0.2' gem.add_development_dependency 'json-ld', '~> 3.3' gem.add_development_dependency 'rdf-spec', '~> 3.3' gem.add_development_dependency 'rdf-isomorphic', '~> 3.3'