Issue #14025 has been reported by frankpimenta (Frank Pimenta).

----------------------------------------
Bug #14025: #initialize with ivars
https://bugs.ruby-lang.org/issues/14025

* Author: frankpimenta (Frank Pimenta)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
For:

  class Person
    def initialize name = 'person'
      @name = name
    end
  end

I thought that the following would be nice:

class Person
  initialize :name
 end

class Person
  initialize name: 'person', age: 18
end

class Person
  def initialize @name="person", @age=18
    puts "initializing...something to run before"
  end
end

--
 B., Frank.



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

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>