エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
Feature #9451: Refinements and unary & (to_proc) - Ruby master - Ruby Issue Tracking System
記事へのコメント1件
- 注目コメント
- 新着コメント
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
Feature #9451: Refinements and unary & (to_proc) - Ruby master - Ruby Issue Tracking System
Not sure if this is a bug or feature request: require 'minitest/autorun' require 'set' module Cla... Not sure if this is a bug or feature request: require 'minitest/autorun' require 'set' module ClassToProc refine Class do def to_proc lambda{ |*args| self.new(*args) } end end end using ClassToProc describe 'Class#to_proc' do it 'works when called directly' do Set.to_proc[[1,2]].must_equal Set[1,2] end it 'fails when called via ampersand' do [[1,2]].map(&Set).must_equal [Set[1,2]] end end The seco
2014/04/29 リンク