null+****@clear*****
null+****@clear*****
2012年 6月 7日 (木) 14:17:40 JST
Haruka Yoshihara 2012-06-07 14:17:40 +0900 (Thu, 07 Jun 2012)
New Revision: 2619077ef8ccc3a6bc6e55832a1f8c5cb82621bd
Log:
Use a return value instead of a clouse
Modified files:
lib/groonga/tester.rb
Modified: lib/groonga/tester.rb (+1 -4)
===================================================================
--- lib/groonga/tester.rb 2012-06-07 12:52:55 +0900 (8cde9e5)
+++ lib/groonga/tester.rb 2012-06-07 14:17:40 +0900 (03a1774)
@@ -690,10 +690,7 @@ module Groonga
def send_command(command_line)
converter = CommandFormatConverter.new(command_line)
url = "http://#{@host}:#{@port}#{converter.to_url}"
- response_content = ""
- open(url) do |response|
- response_content = response.read
- end
+ response_content = open(url).read
"#{response_content}\n"
end