Issue #2376 has been updated by Shugo Maeda.

File __method__spec.rb added

It seems that most of the failures are not due to __method__.

The attached specs, which does not use Kernel#send, results in only one failure.
However, the following failure is strange.

$ mspec -t ruby-1_8 core/kernel/__method__spec.rb
ruby 1.8.8dev (2009-12-05 revision 26022) [i686-linux]
.......F

1)
Kernel.__method__ returns nil when not called from a method FAILED
Expected :config
 to equal nil

/home/shugo/src/mspec/lib/mspec/expectations/expectations.rb:15:in `fail_with'
/home/shugo/src/mspec/lib/mspec/matchers/base.rb:8:in `=='
/home/shugo/src/rubyspec/core/kernel/__method__spec.rb:52
/home/shugo/src/mspec/lib/mspec/runner/mspec.rb:67:in `instance_eval'
/home/shugo/src/mspec/lib/mspec/runner/mspec.rb:67:in `protect'
/home/shugo/src/mspec/lib/mspec/runner/context.rb:135:in `protect'
/home/shugo/src/rubyspec/core/kernel/__method__spec.rb:46:in `all?'
/home/shugo/src/mspec/lib/mspec/runner/context.rb:135:in `each'
/home/shugo/src/mspec/lib/mspec/runner/context.rb:135:in `all?'
/home/shugo/src/mspec/lib/mspec/runner/context.rb:135:in `protect'
/home/shugo/src/mspec/lib/mspec/runner/context.rb:163:in `process'
/home/shugo/src/mspec/lib/mspec/runner/context.rb:155:in `each'
/home/shugo/src/mspec/lib/mspec/runner/context.rb:155:in `process'
/home/shugo/src/mspec/lib/mspec/runner/mspec.rb:36:in `describe'
/home/shugo/src/mspec/lib/mspec/runner/object.rb:11:in `describe'
/home/shugo/src/rubyspec/core/kernel/__method__spec.rb:9
/home/shugo/src/mspec/lib/mspec/runner/mspec.rb:55:in `load'
/home/shugo/src/mspec/lib/mspec/runner/mspec.rb:55:in `files'
/home/shugo/src/mspec/lib/mspec/runner/mspec.rb:67:in `instance_eval'
/home/shugo/src/mspec/lib/mspec/runner/mspec.rb:67:in `protect'
/home/shugo/src/mspec/lib/mspec/runner/mspec.rb:55:in `files'
/home/shugo/src/mspec/lib/mspec/runner/mspec.rb:49:in `each'
/home/shugo/src/mspec/lib/mspec/runner/mspec.rb:49:in `files'
/home/shugo/src/mspec/lib/mspec/runner/mspec.rb:41:in `process'
/home/shugo/src/mspec/lib/mspec/commands/mspec-run.rb:87:in `run'
/home/shugo/src/mspec/lib/mspec/utils/script.rb:217:in `main'
/home/shugo/src/mspec/bin/mspec-run:8

Finished in 0.014296 seconds

1 file, 8 examples, 8 expectations, 1 failure, 0 errors

"config" may be a method of mspec, but it's not found in the stack trace.
A __method__ call outside mspec returns nil.
----------------------------------------
http://redmine.ruby-lang.org/issues/show/2376

----------------------------------------
http://redmine.ruby-lang.org