[ruby-trunk - Bug #10259] [Closed] send を使った attr_writer への書き込み

Issue #10259 has been updated by Nobuyoshi N…

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

Applied in changeset r47643.


symbol.c: fix dynamic attrset ID

  • symbol.c (rb_str_dynamic_intern): check if the stem ID of
    attrset ID is already registered as a static ID.
    [ruby-dev:48559] [Bug #10259]

Bug #10259: send を使った attr_writer への書き込みができない場合がある

  • Author: Fumiaki Matsushima
  • Status: Closed
  • Priority: Normal
  • Assignee:
  • Category:
  • Target version:
  • ruby -v: 2.2.0dev, 2.2.0-preview1
  • Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN

class Hoge; attr_writer :a; end

Hoge.new.send(:"#{:a}=", 1)
# => 1 (ruby 2.1.2)
# hoge.rb:3:in `<main>': undefined method `a=' (ruby 2.2.0-preview1)