[Groonga-commit] droonga/fluent-plugin-droonga at 8ef2173 [master] Use each instead of collect

Back to archive index

Yoji Shidara null+****@clear*****
Thu Jan 23 13:46:45 JST 2014


Yoji Shidara	2014-01-23 13:46:45 +0900 (Thu, 23 Jan 2014)

  New Revision: 8ef21731285adab93554e5560547d1c53d7b1a16
  https://github.com/droonga/fluent-plugin-droonga/commit/8ef21731285adab93554e5560547d1c53d7b1a16

  Merged 1ab6677: Merge branch 'output-attributes'

  Message:
    Use each instead of collect
    
    each is enough for this case

  Modified files:
    lib/droonga/searcher.rb

  Modified: lib/droonga/searcher.rb (+2 -2)
===================================================================
--- lib/droonga/searcher.rb    2014-01-23 12:22:17 +0900 (aa1a374)
+++ lib/droonga/searcher.rb    2014-01-23 13:46:45 +0900 (b150f19)
@@ -420,7 +420,7 @@ module Droonga
 
       def format(attributes, table)
         formatted_attributes = {}
-        attributes.collect do |attribute|
+        attributes.each do |attribute|
           formatted_attribute = format_attribute(attribute, table)
           attribute_name = attribute[:label]
           formatted_attributes[attribute_name] = formatted_attribute
@@ -483,7 +483,7 @@ module Droonga
 
       def format_record(attributes, record)
         values = {}
-        attributes.collect do |attribute|
+        attributes.each do |attribute|
           values[attribute[:label]] = record_value(record, attribute)
         end
         values
-------------- next part --------------
HTML����������������������������...
다운로드 



More information about the Groonga-commit mailing list
Back to archive index