Skip to content

Commit ecfa285

Browse files
committed
"Fix" syntax in vocabulary.rb that Ruby versions < 2.2.5 don't parse properly. Set Travis to test on 2.2.2, not just 2.2, which defaulted to 2.2.7 at the time of this fix.
Fixes #386.
1 parent d42c565 commit ecfa285

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ before_install:
77
env:
88
- CI=true
99
rvm:
10-
- 2.2
10+
- 2.2.2
1111
- 2.3
1212
- 2.4
1313
- 2.5

lib/rdf/vocabulary.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ def from_graph(graph, url: nil, class_name: nil, extra: nil)
534534
term_defs.each do |term, attributes|
535535
# Turn embedded BNodes into either their Term definition or a List
536536
attributes.each do |ak, avs|
537-
attributes[ak] = avs.is_a?(Array) ? avs.map do |av|
537+
attributes[ak] = avs.is_a?(Array) ? (avs.map do |av|
538538
l = RDF::List.new(subject: av, graph: graph)
539539
if l.valid?
540540
RDF::List.new(subject: av) do |nl|
@@ -547,7 +547,7 @@ def from_graph(graph, url: nil, class_name: nil, extra: nil)
547547
else
548548
av
549549
end
550-
end.compact : avs
550+
end).compact : avs
551551
end
552552

553553
if term == :""

0 commit comments

Comments
 (0)