Project

General

Profile

Actions

Bug #11850

closed

`define_method(:foo, &:bar)` segfaults irrespective of location or arguments.

Added by 0x0dea (D.E. Akers) about 9 years ago. Updated almost 9 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.3.0dev (2015-12-20 trunk 53209) [x86_64-linux]
[ruby-core:72398]

Description

define_method(:foo, :bar.to_proc) behaves as it did in previous versions of Ruby.

Actions #1

Updated by ko1 (Koichi Sasada) about 9 years ago

  • Status changed from Open to Closed

Applied in changeset r53213.


  • proc.c (rb_mod_define_method): should check Symbol or not.
    [Bug #11850]

  • test/ruby/test_method.rb: add a test.

Updated by usa (Usaku NAKAMURA) almost 9 years ago

  • Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN to 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: DONTNEED
Actions

Also available in: Atom PDF

Like0
Like0Like0