[#81999] [Ruby trunk Bug#13737] "can't modify frozen String" when installing bundled gems — ko1@...
Issue #13737 has been updated by ko1 (Koichi Sasada).
4 messages
2017/07/11
[#82005] [Ruby trunk Bug#13737] "can't modify frozen String" when installing bundled gems — nobu@...
Issue #13737 has been updated by nobu (Nobuyoshi Nakada).
3 messages
2017/07/12
[#82102] Re: register_fstring_tainted:FL_TEST_RAW(str, RSTRING_FSTR) — Eric Wong <normalperson@...>
Koichi Sasada <ko1@atdot.net> wrote:
4 messages
2017/07/18
[#82151] [Ruby trunk Feature#13637] [PATCH] tool/runruby.rb: test with smallest possible machine stack — Rei.Odaira@...
Issue #13637 has been updated by ReiOdaira (Rei Odaira).
3 messages
2017/07/24
[ruby-core:82142] [Ruby trunk Bug#13762][Rejected] Change in `#==` in Ruby 2.4?
From:
nobu@...
Date:
2017-07-24 01:17:19 UTC
List:
ruby-core #82142
Issue #13762 has been updated by nobu (Nobuyoshi Nakada).
Description updated
Status changed from Open to Rejected
When you write your custom `method_missing`, you have to write your custom `respond_to_missing?` too.
----------------------------------------
Bug #13762: Change in `#==` in Ruby 2.4?
https://bugs.ruby-lang.org/issues/13762#change-65899
* Author: backus (John Backus)
* Status: Rejected
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
Given this code:
```ruby
# frozen_string_literal: true
class MyProxy < BasicObject
def initialize(target)
@target = target
end
undef_method :==
def method_missing(method_name, *args, &block)
if target_respond_to?(method_name)
@target.__send__(method_name, *args, &block)
else
::Object
.instance_method(method_name)
.bind(@target)
.call(*args, &block)
end
end
private
def target_respond_to?(method_name)
::Object
.instance_method(:respond_to?)
.bind(@target)
.call(method_name, true)
end
end
puts 'a' == MyProxy.new('a')
puts MyProxy.new('a') == 'a'
puts MyProxy.new('a') == MyProxy.new('a')
```
The output differs depending on the Ruby version:
```
$ chruby 2.3.4
$ ruby test.rb
true
true
true
$ chruby 2.4.1
$ ruby test.rb
false
true
false
```
---Files--------------------------------
test.rb (739 Bytes)
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>