Project

General

Profile

Actions

Backport #8540

closed

Ruby crashes when sending "attr="

Added by woodbridge (Justin Woodbridge) over 11 years ago. Updated over 11 years ago.


Description

Ruby crashes when trying to run: obj.send "attr=" where attr= is a method defined by attr_accessor. Only happens when no argument is provided.

Expected: wrong number of arguments (0 for 1) (ArgumentError)
Actual: crashes

Code sample and crash logs: https://gist.github.com/woodbridge/5805212 .

Ruby Versions: 2.0.0-p0, 2.0.0-p195, and rev 4ff3b.
Systems: Mac OS X 10.8.2 (x86_64)

Updated by Anonymous over 11 years ago

  • Assignee set to Anonymous

Updated by Anonymous over 11 years ago

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

Fixed in r41389, accidentally omitted the bug number from the commit message.

Actions #3

Updated by nagachika (Tomoyuki Chikanaga) over 11 years ago

  • Tracker changed from Bug to Backport
  • Project changed from Ruby master to Backport200
  • Status changed from Closed to Assigned
  • Assignee changed from Anonymous to nagachika (Tomoyuki Chikanaga)
Actions #4

Updated by nagachika (Tomoyuki Chikanaga) over 11 years ago

  • Status changed from Assigned to Closed

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


merge revision(s) 41389: [Backport #8540]

* vm_insnhelper.c (vm_call_method): ensure methods of type
  VM_METHOD_TYPE_ATTR_SET are called with 1 argument

* test/ruby/test_module.rb (class TestModule): add test
[ruby-core:55543] [Bug #8540]
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0