Backport #7925

refine bug with puts

Added by Marc-Andre Lafortune about 1 year ago. Updated about 1 year ago.

[ruby-core:52750]
Status:Closed
Priority:Normal
Assignee:Tomoyuki Chikanaga

Description

As reported by Dave Thomas in

module VanityPuts
  refine Object do
    private
    def puts(*args)
      args.each do |arg|
        super("Dave says: #{arg}")
      end
    end
  end
end

using VanityPuts

puts "Hello" # => SystemStackError, expected "Dave says: Hello"

Associated revisions

Revision 39672
Added by Tomoyuki Chikanaga about 1 year ago

merge revision(s) 39451: [Backport #7925]

* vm_insnhelper.c (vm_call_method): block level control frame does not
  have method entry, so obtain the method entry from method top-level
  control frame to be compared with refined method entry.
   [Bug #7925]

History

#1 Updated by Nobuyoshi Nakada about 1 year ago

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

This issue was solved with changeset r39451.
Marc-Andre, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


vm_insnhelper.c: compare with me in method top cfp

  • vminsnhelper.c (vmcall_method): block level control frame does not have method entry, so obtain the method entry from method top-level control frame to be compared with refined method entry. [Bug #7925]

#2 Updated by Tomoyuki Chikanaga about 1 year ago

  • Tracker changed from Bug to Backport
  • Project changed from ruby-trunk to Backport200
  • Category deleted (core)
  • Status changed from Closed to Assigned
  • Assignee changed from Shugo Maeda to Tomoyuki Chikanaga
  • Target version deleted (next minor)

I think this is definitely a bug-fix.

#3 Updated by Tomoyuki Chikanaga about 1 year ago

  • Status changed from Assigned to Closed

This issue was solved with changeset r39672.
Marc-Andre, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


merge revision(s) 39451: [Backport #7925]

* vm_insnhelper.c (vm_call_method): block level control frame does not
  have method entry, so obtain the method entry from method top-level
  control frame to be compared with refined method entry.
   [Bug #7925]

Also available in: Atom PDF