Skip to content

Instantly share code, notes, and snippets.

View nobuoka's full-sized avatar

Nobuoka Yu nobuoka

View GitHub Profile
@nobuoka
nobuoka / gist:2344397
Created April 9, 2012 15:55
Japanese translation for Rubinius
diff --git a/web/doc/ja/getting-started.markdown b/web/doc/ja/getting-started.markdown
index 9412036..c9f6de6 100644
--- a/web/doc/ja/getting-started.markdown
+++ b/web/doc/ja/getting-started.markdown
@@ -1,18 +1,17 @@
---
layout: doc_ja
-title: Getting Started
-previous: What is Rubinius?
+title: はじめに
diff --git a/lib/webrick/httpresponse.rb b/lib/webrick/httpresponse.rb
index 0d36c07..d6e88e5 100644
--- a/lib/webrick/httpresponse.rb
+++ b/lib/webrick/httpresponse.rb
@@ -330,13 +330,18 @@ module WEBrick
if @request_method == "HEAD"
# do nothing
elsif chunked?
- while buf = @body.read(@buffer_size)
- next if buf.empty?
require 'pg'
# 接続先 DB の情報
DB_S_ARRAY = [ 'localhost', 5432, '', '', 'db_name', 'user_name', 'password' ]
# テーブル table_name に対して先にロックを獲得するスレッド
t1 = Thread.new do
dbconn = PGconn.connect( *DB_S_ARRAY )
dbconn.transaction do
puts 'locking table... (t1)'