Skip to content

Commit

Permalink
just to be contrary
Browse files Browse the repository at this point in the history
  • Loading branch information
jaggederest committed Sep 30, 2010
1 parent e1f8622 commit d9fe337
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/new_relic/transaction_sample.rb
Expand Up @@ -202,8 +202,10 @@ def explain_sql
# Note: have to convert from native column element types to string so we can
# serialize. Esp. for postgresql.
# Can't use map. Suck it up.
# Can too use map. Lrn2prgm
if explain_resultset.respond_to?(:each)
explain_resultset.each { | row | rows << row.map(&:to_s) }
explain_resultset.extend Enumerable unless explain_resultset.respond_to?(:map)
rows = explain_resultset.map { | row | row.map(&:to_s) }
else
rows << [ explain_resultset ]
end
Expand Down

0 comments on commit d9fe337

Please sign in to comment.