Project

General

Profile

Actions

Backport #9296

closed

please backport r44380 (visibility of methods defined by define_method)

Added by usa (Usaku NAKAMURA) almost 11 years ago. Updated almost 11 years ago.

Status:
Closed

Description

this seems a severe incompatibility with ruby 2.0 or earlier.


Related issues 2 (0 open2 closed)

Related to Ruby master - Bug #9005: object.send(:define_method, ...){...} creates private methodClosednobu (Nobuyoshi Nakada)10/09/2013Actions
Related to Ruby master - Bug #9141: define_singleton_method creates private methodClosed11/22/2013Actions
Actions #1

Updated by naruse (Yui NARUSE) almost 11 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r44410.
Usaku, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


merge revision(s) 44380: [Backport #9296]

* proc.c (rb_mod_define_method): consider visibility only if self
  in the caller is same as the receiver, otherwise make public as
  well as old behavior.  [ruby-core:57747] [Bug #9005]
  [ruby-core:58497] [Bug #9141]

* vm.c (rb_vm_cref_in_context): return ruby level cref if self is
  same.
Actions

Also available in: Atom PDF

Like0
Like0