21
Ruby�考古学� �消された機能編 Archaeology�of�Ruby:� �Removed�Features Kazuhiro�NISHIYAMA RubyKaigi2014 2014/09/19

rubykaigi2014-ruby-removed-features ===================================

Embed Size (px)

DESCRIPTION

RubyKaigi 2014 での発表資料です。

Citation preview

Page 1: rubykaigi2014-ruby-removed-features ===================================

Ruby�考古学��消された機能編Archaeology�of�Ruby:��Removed�Features

Kazuhiro�NISHIYAMARubyKaigi20142014/09/19

Page 2: rubykaigi2014-ruby-removed-features ===================================

Self�introduction

one�of�Ruby�CommittersMr.�fix�typo�(by�Chikanaga)

I�use�Ruby�since�1.4

Page 3: rubykaigi2014-ruby-removed-features ===================================

Agenda

リリースに⼊った後、消された機能�Some�features�removed�after�release

開発版のみに⼊っていた機能�Some�features�only�in�development�branch

Page 4: rubykaigi2014-ruby-removed-features ===================================

Safe�Level

��������is�obsolete�since�2.1.0

不完全な�Sand�Box

Safe�Level�自体の削除の話も何度かあった

Page 5: rubykaigi2014-ruby-removed-features ===================================

Safe�level

Feature�#8468�Remove�$SAFEMatz�agreed�at�GitHub�Tokyo�drinkup�(on�2013)

tDiary,�which�is�the�only�application�using�$SAFE�==�4,�also�agreed

����������is�a�fail-safe�feature�to�detect�bugs�of�applications

Page 6: rubykaigi2014-ruby-removed-features ===================================

Safe�Level

��������is�obsolete�since�2.1.0raise�ArgumentError

��������since�1.9.1

��������is�deprecated�since�2.1.0its�behavior�is�same�as�taint

Page 7: rubykaigi2014-ruby-removed-features ===================================

����from�����������

security�reason

same�as������does�not�contain����since�1.9.2

use������������������instead

Page 8: rubykaigi2014-ruby-removed-features ===================================

������

from��������to�Encoding�(m17n)

�������#=>�nil�#�warning:�variable�$KCODE�is�no�longer�effective

��������#�warning:�variable�$KCODE�is�no�longer�effective;�ignored

Page 9: rubykaigi2014-ruby-removed-features ===================================

Regexp�options

Regexp�literal�options�(remains)�:������������

��������������������������������������������������������������������������������������������������������������������������������������������������

Page 10: rubykaigi2014-ruby-removed-features ===================================

���(ignore�case)

���������

ruby�1.8.7:�warning:�modifying�$=�is�deprecated

ruby�1.9.3:�warning:�variable�$=�is�no�longer�effective;�ignored

Page 11: rubykaigi2014-ruby-removed-features ===================================

�������between�1.6.7�and�1.8.0

���������→��������

���������→��������

���������→��������������

���������→�������������

���������→��������������

Page 12: rubykaigi2014-ruby-removed-features ===================================

��������until�1.8

�������������������

:�をつけられる隠し機能の削除

Page 13: rubykaigi2014-ruby-removed-features ===================================

������������

�������������(recommend)

�������������(deprecated)

Ruby�本体のメソッド名は出来るだけ三単現のsを付けない

�������������������������������������������������������������������������������������������

Page 14: rubykaigi2014-ruby-removed-features ===================================

Agenda

リリースに⼊った後、消された機能�Some�features�removed�after�release

開発版のみに⼊っていた機能Some�features�only�in�development�branch

Page 15: rubykaigi2014-ruby-removed-features ===================================

Symbol�<�String�in�2006�(1.9.0-dev)

Symbol�が�String�を継承していた時期があった

Symbol�<�Stringも⽌める。caseとかでのバグをたくさん⽣んでしまうhttp://www.rubyist.net/~matz/20061107.html#p03

Page 16: rubykaigi2014-ruby-removed-features ===================================

Symbol�<�String�(cont.)

���������������������������������������������������������������������������������������������������

��������������������������������������������������������

継承は⽌めても�String�に似た扱いは⼊った。

Page 17: rubykaigi2014-ruby-removed-features ===================================

������between�1.8�and�1.9

���������cannot�call�private�methods

������,��������

������������since�1.9.1

private�メソッド呼び出し用途が多く影響範囲が広いため元の挙動に

Page 18: rubykaigi2014-ruby-removed-features ===================================

Real�multi-value�(to̲splat)

1.9.x

���������(!=�������)�(!=�����)

svalue,�avalue,�mvalue

e.g.��������������

Page 19: rubykaigi2014-ruby-removed-features ===================================

Symbol.find�in�2.2.0-dev

Symbol.find(str)��->�symbol�or�nilReturn�the�related�symbol�if�the�symbol�already�exists.

Return�nil�if�not.

revision�47543Removed�because�of�Symbol�GC

If�you�still�want�this,�request�again�on�Redmine.

Page 20: rubykaigi2014-ruby-removed-features ===================================

statfs�in�2.2.0-dev

����������and�������������https://bugs.ruby-lang.org/issues/9772

��������������for�tests

Reject�at�DevelopersMeeting20140517Japan「Matz:�⾊々込み⼊ってるので�core�には⼊れないで�test�配下へ.�欲しいということがあったら�gem�にしてください.」

Page 21: rubykaigi2014-ruby-removed-features ===================================

Conclusion

Some�features�only�in�development�branch

Some�features�cannot�introduce�because�of�compatibility