Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
rubyneko - english
[go: Go Back, main page]

手描きの似顔絵プレゼントキャンペーン!
ようこそ ゲスト さん
ホーム
ログイン

"$stdout vs STDOUT"を翻訳

ちょっと古いエントリだけど、[ruby-talk]で$stdoutとSTDOUTの関係についての
話があったので、翻訳してみた。


$stdout vs STDOUT
http://blog.segment7.net/articles/2006/08/17/stdout-vs-stdout

標準出力を隠したいとき、$stdoutを使うのとSTDOUTを使うのと二つのやりかたがある。

Rubyが起動するとき、そのプロセスの標準出力ファイルディスクリプタがSTDOUTとグローバル変数$stdoutの両方に格納される。$stdoutは再代入可能なのに対し、STDOUTはそのプロセスの元のstdoutを持ち続ける。Kernel#putsとそれら(pとかprintとか)はwriteするのに$stdoutを使うのであって、STDOUTは使わない。

stdoutをリダイレクトしたいときは、STDOUTをごにょごにょするようなつまんないことをせずに、$stdoutに代入するべし。明示的なファイルディスクリプタに出力するには$stdoutと$stderrを、STDOUTとSTDERRのかわりに使う。

STDOUTはIO#reopenのときにのみ変更できるけど、$stdoutなら#writeがある任意のオブジェクトを代入できる。まさに私のThreadOutのhackのことだね。



翻訳むずい

rails-1.2.4 released(1)

Riding Rails: Rails 1.2.4: Maintenance release
http://weblog.rubyonrails.org/2007/10/5/rails-1-2-4-maintenance-release

In the meantime, I updated rails and others.

$ sudo gem update rails -y                                                                              
Password:
Updating installed gems...
Bulk updating Gem source index for: http://gems.rubyforge.org
Attempting remote update of rails
Successfully installed rails-1.2.4
Successfully installed activesupport-1.4.3
Successfully installed activerecord-1.15.4
Successfully installed actionpack-1.13.4
Successfully installed actionmailer-1.3.4
Successfully installed actionwebservice-1.2.4
Installing ri documentation for activesupport-1.4.3...
Installing ri documentation for activerecord-1.15.4...
Installing ri documentation for actionpack-1.13.4...
Installing ri documentation for actionmailer-1.3.4...
Installing ri documentation for actionwebservice-1.2.4...
Installing RDoc documentation for activesupport-1.4.3...
Installing RDoc documentation for activerecord-1.15.4...
Installing RDoc documentation for actionpack-1.13.4...
Installing RDoc documentation for actionmailer-1.3.4...
Installing RDoc documentation for actionwebservice-1.2.4...
Gems: [rails] updated


I have not tested yet.

TOEFL勉強中(2)

ripeness 熟してること
trek (難儀な)旅行
scrutiny 精密な調査
foraging 狩猟採集
refute 反論する
dismissed 棄却された
steeply 急に
revolve 回る
contemporary 同時, 現代
discard 捨てる
endure 耐える
a rule of thumb 経験から言って
intricate 複雑な
oppressive 圧政的な
intriguing 興味をそそる
contradict 矛盾する, 否定する
self-effacing 控えめな
flamboyant きらびやかな, 仰々しい
surly 無愛想な
introspective 内省的な
disgrace 不名誉


Listening全然わからん…
何度も聞いてやっと聞こえてくる感じ。

Changelogのための英文テンプレート集

Matzにっき(2007-09-22)
http://www.rubyist.net/~matz/20070922.html#p02

より:

ぴょぴょぴょ? - Linuxとかプログラミングの覚え書き - - Changelogのための英文テンプレート集
http://d.hatena.ne.jp/pyopyopyo/20070920/p

いいなぁ。こういうのすっごい助かる。


よく見てみると他にも、Release note のための英文テンプレート集とかがある。
ちょうど英語勉強中だし、RSSリーダに登録させていただいた。

チャンネル

フレンド

コメント

On Lisp読書会#2に行ってきた
ドタキャンした内の一人です。申し訳ない o
にゃかもとさん
Rubyとsqlite3でTF-IDFを計算してみよう
こんにちは,noriakiと申します. 私は
noriakiさん
using sqlite3 with ActiveRecord without Rails
なるほど! 対象を指定しなきゃいけない
ujihisaさん
using sqlite3 with ActiveRecord without Rails
define のブロックパラメータに ActiveReco
novさん
Haskellで外部コマンド実行
おお、そんな手が! これで外部コマンドも
ujihisaさん