< :前の番号
^ :番号順リスト
> :次の番号
P :前の記事(自分と同じ返事先を持つ)
N :次の記事
|<:スレッドの先頭
>|:次のスレッド
^ :返事先
_:自分への返事
>:同じ返事先を持つ記事(前)
<:同じ返事先を持つ記事(後)
---:分割してスレッド表示、再表示
| :分割して(縦)スレッド表示、再表示
~ :スレッドのフレーム消去
.:インデックス
..:インデックスのインデックス
2008/9/8 Yukihiro Matsumoto <matz / ruby-lang.org>:
> Hi,
>
> In message "Re: [ruby-core:18490] Re: [ANN] Ruby 1.9.1 feature freeze"
> on Mon, 8 Sep 2008 18:05:05 +0900, Nobuyoshi Nakada <nobu / ruby-lang.org> writes:
>
> |At Sun, 7 Sep 2008 04:53:43 +0900,
> |Yukihiro Matsumoto wrote in [ruby-core:18471]:
> |> This is a proposal to add __file__ and __line__ methods to Method and
> |> Proc objects.
>
> |I propose a new method, #location than those two new methods.
>
> I like the idea. How others think?
Good! I'd like to suggest a name alternative though
#defined_at
IMHO #location is very general and #defined_at better expresses what's
being returned (at least from what I gathered should be the semantics
of this method). Usage would be
def foo(&b)
file, line = b.defined_at
$stderr.printf "calling block which was defined at %s:%d\n", file, line
b.call
end
Kind regards
robert
--
use.inject do |as, often| as.you_can - without end