Error: unknown Blosxom flavour "writeback"

I'm afraid this is the first I've heard of a "writeback" flavoured Blosxom. Try dropping the "/+writeback" bit from the end of the URL.

Mon, 30 Jul 2007

load '~/.someconf'

 Ruby で設定ファイルを読み込む定番は Kernel.load だけど、なんとなく設定項目をローカル変数にしたら何も読み込まれなくて、きょとん。
~./someconf:
someconf = 'is in HOME'
p local_variables
p self
some.rb:
somerb = 'is in somewhere'
load '~/.someconf'
p local_variables
p self
実行結果:
/path/to/somewhere>ruby some.rb
["someconf"]
main
["somerb"]
main
/home>

 どうやら load 元と load 先ではスコープが違うらしい(load 先が別メソッド内にあるような感じ?)。self は共通なので、インスタンス変数にするのが正解なのかな(@someconf みたいに)。

#