Skip to content

Commit 4da1914

Browse files
committed
Merge pull request #299 from ruby-rdf/feature/rbx-term-uri
Work around odd Rubinius problem involing variable arguments and super
2 parents e57000d + 310937b commit 4da1914

4 files changed

Lines changed: 9 additions & 6 deletions

File tree

.travis.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ rvm:
1212
- rbx-2
1313
cache: bundler
1414
sudo: false
15-
matrix:
16-
allow_failures:
17-
- rvm: rbx-2
1815
addons:
1916
code_climate:
20-
repo_token: 5806cc8a21c03f4e2f9d3b9d98d5d9fe084b66243b1dbb27b467dbc795acdcac
17+
repo_token: 5806cc8a21c03f4e2f9d3b9d98d5d9fe084b66243b1dbb27b467dbc795acdcac

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ group :debug do
1818
gem "wirble"
1919
gem "redcarpet", platforms: :ruby
2020
gem "byebug", platforms: :mri
21+
gem 'rubinius-debugger', platform: :rbx
2122
gem 'guard-rspec'
2223
end
2324

lib/rdf/vocabulary.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,13 @@ class Term < RDF::URI
527527
# Attributes of this vocabulary term, used for finding `label` and `comment` and to serialize the term back to RDF
528528
def initialize(*args, **options)
529529
@attributes = options.fetch(:attributes)
530-
super
530+
if RUBY_ENGINE == "rbx"
531+
# FIXME: Somehow, this gets messed up in Rubinius
532+
args << options
533+
super(*args)
534+
else
535+
super
536+
end
531537
end
532538

533539
##

spec/vocabulary_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@
122122
expect(RDF).to be_a_vocabulary("http://www.w3.org/1999/02/22-rdf-syntax-ns#")
123123
expect(RDF).to have_properties("http://www.w3.org/1999/02/22-rdf-syntax-ns#", %w(first object predicate rest subject type value))
124124
expect(RDF).to have_terms("http://www.w3.org/1999/02/22-rdf-syntax-ns#", %w(datatype Description parseType ID nodeID li))
125-
expect(RDF).to have_terms("http://www.w3.org/1999/02/22-rdf-syntax-ns#", %w(datatype Description parseType ID nodeID li))
126125
%w(first object predicate rest subject type value).each do |p|
127126
expect(RDF.send(p)).to eq RDF::URI("http://www.w3.org/1999/02/22-rdf-syntax-ns##{p}")
128127
end

0 commit comments

Comments
 (0)