[ruby-core:60654] [Backport200 - Backport #9248] [Closed] Struct methods, segmentation fault

From: nagachika00@...
Date: 2014-02-11 14:55:11 UTC
List: ruby-core #60654
Issue #9248 has been updated by Tomoyuki Chikanaga.

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

Applied in changeset r44911.

----------
merge revision(s) r42479,r42490,r42509,r43083,r43084,r43085: [Backport #8756] [Backport #9248]

	* parse.y (rb_enc_symname_type): allow ID_ATTRSET for ID_INSTANCE,
	  ID_GLOBAL, ID_CLASS, ID_JUNK too.  [Bug #8756]

	* parse.y (rb_id_attrset): fix inconsistency with literals, allow
	  ID_ATTRSET and return it itself, but ID_JUNK cannot make ID_ATTRSET.
	  and raise a NameError instead of rb_bug() for invalid argument.

	* parse.y (rb_id_attrset, intern_str): allow junk attrset ID for
	  Struct.

	* parse.y (rb_id_attrset): check if the argument is valid type as an
	  attribute.

	* parse.y (rb_id_attrset): allow other than ID_ATTRSET.

	* parse.y (intern_str): ditto.  try stem ID for ID_INSTANCE,
	  ID_GLOBAL, ID_CLASS, ID_JUNK too.  [Bug #8756]

----------------------------------------
Backport #9248: Struct methods, segmentation fault
https://bugs.ruby-lang.org/issues/9248#change-45085

* Author: H H
* Status: Closed
* Priority: Normal
* Assignee: Tomoyuki Chikanaga
* Category: 
* Target version: 
* ruby -v: 2.0.0p353
----------------------------------------
=begin
The following snippet causes segmentation fault:

(({p Struct.new(:method_with_questionmark?).new.methods}))

This happens when accessor method name contains question mark.
=end




-- 
http://bugs.ruby-lang.org/

In This Thread