Skip to content

Commit bac3222

Browse files
committed
String#to_a has weird behavior in ruby 1.8.. guess we can't be this clever
1 parent 2d3a520 commit bac3222

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/oai/provider/response/record_response.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ def about_for(record)
3535
about = provider.model.about(record)
3636
return if about.nil?
3737

38-
Array(about).each do |a|
38+
unless about.is_a? Array
39+
about = [about]
40+
end
41+
42+
about.each do |a|
3943
@builder.about do
4044
@builder.target! << a
4145
end

0 commit comments

Comments
 (0)