Forum: Ruby-dev no warning: found = in conditional, should be ==

C4e88907313843cf07f6d85ba8162120?d=identicon&s=25 ko1 (Koichi Sasada) (Guest)
on 2012-10-26 22:56
(Received via mailing list)
Issue #4299 has been updated by ko1 (Koichi Sasada).

Target version changed from 2.0.0 to next minor

放置されているようなので next minor に送っておきます.
----------------------------------------
Feature #4299: no warning: found = in conditional, should be ==
https://bugs.ruby-lang.org/issues/4299#change-31656

Author: znz (Kazuhiro NISHIYAMA)
Status: Feedback
Priority: Normal
Assignee: nobu (Nobuyoshi Nakada)
Category: core
Target version: next minor


=begin
 http://d.hatena.ne.jp/nagachika/20110119/ruby_trun...
 で知ったのですが、右辺の種類によっては「warning: found = in conditional, should be
==」が出ないことがあるようです。

 % ruby-trunk -ve '!_=""'
 ruby 1.9.3dev (2011-01-20 trunk 30614) [i686-linux]
 -e:1: warning: found = in conditional, should be ==
 % ruby-trunk -ve '!_=1'
 ruby 1.9.3dev (2011-01-20 trunk 30614) [i686-linux]
 -e:1: warning: found = in conditional, should be ==
 % ruby-trunk -ve '!_={}'
 ruby 1.9.3dev (2011-01-20 trunk 30614) [i686-linux]
 % ruby-trunk -ve '!_=[]'
 ruby 1.9.3dev (2011-01-20 trunk 30614) [i686-linux]
 %
=end
This topic is locked and can not be replied to.