Project

General

Profile

Actions

Backport #2519

closed

__method__ can return NULL (and therefore crash ruby)

Added by marcandre (Marc-Andre Lafortune) over 14 years ago. Updated almost 13 years ago.


Description

=begin
In Ruby 1.8.7 and latest 1.8.8:

$ cat ohoh.rb
puts method

$ ruby18dev -e "load 'ohoh.rb'"
val (null) id 140734799802560/Users/work/test/ohoh.rb:1:in to_s': NULL pointer given (ArgumentError) from /Users/work/test/ohoh.rb:1:in puts'
from /Users/work/test/ohoh.rb:1
from -e:1:in `load'
from -e:1

Doing method.inspect instead will crash Ruby
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0