ruby-changes:66205
From: Yusuke <ko1@a...>
Date: Fri, 14 May 2021 15:40:58 +0900 (JST)
Subject: [ruby-changes:66205] f691c15792 (master): ext/objspace/lib/objspace/trace.rb: Remove the original Kernel#p
https://git.ruby-lang.org/ruby.git/commit/?id=f691c15792 From f691c15792a587eeaa36a8c3ab1a6354368bfd33 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh <mame@r...> Date: Fri, 14 May 2021 15:39:57 +0900 Subject: ext/objspace/lib/objspace/trace.rb: Remove the original Kernel#p ... to disable a "method redefined" warning. http://rubyci.s3.amazonaws.com/solaris11-gcc/ruby-master/log/20210514T050008Z.fail.html.gz ``` 1) Failure: TestObjSpace#test_objspace_trace [/export/home/chkbuild/chkbuild-gcc/tmp/build/20210514T050008Z/ruby/test/objspace/test_objspace.rb:621]: <["objspace/trace is enabled"]> expected but was <["/export/home/chkbuild/chkbuild-gcc/tmp/build/20210514T050008Z/ruby/.ext/common/objspace/trace.rb:29: warning: method redefined; discarding old p", "objspace/trace is enabled"]>. ``` --- ext/objspace/lib/objspace/trace.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/objspace/lib/objspace/trace.rb b/ext/objspace/lib/objspace/trace.rb index df803bb..c23f5a9 100644 --- a/ext/objspace/lib/objspace/trace.rb +++ b/ext/objspace/lib/objspace/trace.rb @@ -26,6 +26,7 @@ https://github.com/ruby/ruby/blob/trunk/ext/objspace/lib/objspace/trace.rb#L26 require 'objspace.so' module Kernel + remove_method :p define_method(:p) do |*objs| objs.each do |obj| file = ObjectSpace.allocation_sourcefile(obj) -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/