On 2017/03/26 15:16, Eric Wong wrote:
> Oops, I already committed r57828 before this message.
> opt_str_freeze insn already takes care of redefinition in
> insns.def; so extra check for compile.c won't be affected.

now it checks only 'freeze' redefinition (*1). I'll fix it before 2.5
release (maybe with new a instruction (*2), which replace existing
opt_str_freeze).


*1:
class String
  def -@
    p :redef
    self
  end
end

p -'foo'


*2:
  opt_str_freeze   "foo"
->
  opt_frozen "foo", label # jump if String#freeze or String#-@
                          #         are not redefined
  putstring "foo"
  send "-@"
label:

(or something smarter insn)

-- 
// SASADA Koichi at atdot dot net

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