Skip to content
Browse files

a Hash is not an Array but both have a "collect" method

  • Loading branch information...
1 parent 85f5408 commit 8da4cdb3e42a1c99deb451e66074826d2f351ae0 @mkristian committed May 16, 2012
Showing with 9 additions and 1 deletion.
  1. +8 −0 Mavenfile
  2. +1 −1 lib/babel/serializer.rb
View
8 Mavenfile
@@ -0,0 +1,8 @@
+properties['jruby.versions']='1.5.6,1.6.5.1,1.6.7'
+properties['jruby.18and19']='true'
+properties['jruby.plugins.version']='0.29.0-SNAPSHOT'
+properties['jruby.version']='1.6.7'
+
+# just fixate the version
+gem 'bundler', '= 1.1.3'
+gem 'jruby-openssl', '= 0.7.4'
View
2 lib/babel/serializer.rb
@@ -54,7 +54,7 @@ def use(context_or_options)
def to_hash(options = nil)
filter.use(filter.options.dup.merge!(options)) if options
- if @model_or_models.respond_to? :collect
+ if @model_or_models.respond_to?(:collect) && ! @model_or_models.is_a?(Hash)
@model_or_models.collect do |m|
filter_model(attr(m), m)
end

0 comments on commit 8da4cdb

Please sign in to comment.
Something went wrong with that request. Please try again.