Project

General

Profile

Bug #8936 ยป 0001-Improve-explanation-about-passing-more-parameters-th.patch

cha1tanya (Prathamesh Sonpatki), 09/22/2013 08:05 PM

View differences:

struct.c
* The last two forms create a new instance of a struct subclass. The number
* of +value+ parameters must be less than or equal to the number of
* attributes defined for the structure. Unset parameters default to +nil+.
* Passing too many parameters will raise an ArgumentError.
* Passing more parameters than number of attributes will raise
* an ArgumentError.
*
* # Create a structure named by its constant
* Customer = Struct.new(:name, :address)
    (1-1/1)