[前][次][番号順一覧][スレッド一覧]

ruby-changes:40506

From: hsbt <ko1@a...>
Date: Mon, 16 Nov 2015 15:59:06 +0900 (JST)
Subject: [ruby-changes:40506] hsbt:r52587 (trunk): * struct.c: Standardize a method signature of Struct#[]=.

hsbt	2015-11-16 15:58:43 +0900 (Mon, 16 Nov 2015)

  New Revision: 52587

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52587

  Log:
    * struct.c: Standardize a method signature of Struct#[]=.
      [ci skip][fix GH-1095]

  Modified files:
    trunk/ChangeLog
    trunk/struct.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 52586)
+++ ChangeLog	(revision 52587)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Nov 16 15:58:39 2015  Kenichi Kamiya  <kachick1@g...>
+
+	* struct.c: Standardize a method signature of Struct#[]=.
+	  [ci skip][fix GH-1095]
+
 Mon Nov 16 15:42:36 2015  Akinori MUSHA  <knu@i...>
 
 	* lib/set.rb (#>=, #>, #<=, #<): Make use of Hash#>=, #>, #<, and
Index: struct.c
===================================================================
--- struct.c	(revision 52586)
+++ struct.c	(revision 52587)
@@ -896,11 +896,11 @@ rb_struct_aref(VALUE s, VALUE idx) https://github.com/ruby/ruby/blob/trunk/struct.c#L896
 
 /*
  *  call-seq:
- *     struct[name]  = obj    -> obj
- *     struct[index] = obj    -> obj
+ *     struct[member] = obj    -> obj
+ *     struct[index]  = obj    -> obj
  *
  *  Attribute Assignment---Sets the value of the given struct +member+ or
- *  the member at the given +index+.  Raises NameError if the +name+ does not
+ *  the member at the given +index+.  Raises NameError if the +member+ does not
  *  exist and IndexError if the +index+ is out of range.
  *
  *     Customer = Struct.new(:name, :address, :zip)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]