DevelopersMeeting20180315Japan

Date: 2018/03/15 (Thu)

Time: 14:00- 18:00 (JST)

Place: Cookpad Inc.

Sign-up: https://ruby.connpass.com/event/73509/

log edit: https://docs.google.com/document/d/1RT0ijSo8uJ4Awn3CEvuYkjH0TVeXSYgeAFNmVGYC3ak/edit#

log: TBD

Agenda

Next Developper Meetings

2018/04/19 (Thu) @ Speee

About 2.6 timeframe

Stable versions

Hopefully, there will be a release in March.

Maintainers starting Apr 2018:

From attendees

# current

p 1.step(10, by: 2) #=> #<Enumerator: 1:step(10, {:by=>2})>

p 1.step(by: 2)         #=> #<Enumerator: 1:step({:by=>2})>

# extend

class Enumerator::ArithmeticSequence < Enumerator

  def first; end # already in Enumerator

  def last; end  # new

  def step; end  # new

  def inspect

        ...

  end

end

p 1.step                #=> (1.step)

p 1.step(10)            #=> (1.step(10))

p 1.step(10, by: 2) #=> (1.step(10, by:2))

p 1.step(by: 2)         #=> (1.step(by:2))

From non-attendees

  1. Prohibit inheritance; turn it into just a instance variable of a class; leave @@ just for compat
  1. Remove class variables
  1. Prohibit toplevel cvar assignment (because we already show warning without -w option)
  2. Show stronger warning

Example of “toplevel” and “overtaken”  warning; note that “overtaken” is only shown with -w.

% ruby -w -e '
class A
 @@v = :A
 def self.show() p @@v end
end
class B
 @@v = :B
 def self.show() p @@v end
end
A.show
B.show
@@v = :TOP
A.show
B.show
'
:A
:B
-e:12: warning: class variable access from toplevel
-e:4: warning: class variable @@v of A is overtaken by Object
:TOP
-e:8: warning: class variable @@v of B is overtaken by Object
:TOP