ruby-changes:64493
From: Kazuhiro <ko1@a...>
Date: Wed, 23 Dec 2020 11:15:54 +0900 (JST)
Subject: [ruby-changes:64493] 082114da05 (master): [DOC] Add doc to sharing_detection= [ci skip]
https://git.ruby-lang.org/ruby.git/commit/?id=082114da05 From 082114da0552484d2695f685d781418fa51c7ef8 Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA <zn@m...> Date: Wed, 23 Dec 2020 11:13:50 +0900 Subject: [DOC] Add doc to sharing_detection= [ci skip] Before: ``` $ ri sharing_detection= = .sharing_detection= (from ruby core) === Implementation from PP ------------------------------------------------------------------------ sharing_detection=(b) ------------------------------------------------------------------------ Returns the sharing detection flag as a boolean value. It is false by default. ``` After: ``` $ ri sharing_detection= = .sharing_detection= (from ruby core) === Implementation from PP ------------------------------------------------------------------------ sharing_detection=(b) ------------------------------------------------------------------------ Sets the sharing detection flag to b. ``` diff --git a/lib/pp.rb b/lib/pp.rb index a410a0d..ce282be 100644 --- a/lib/pp.rb +++ b/lib/pp.rb @@ -100,6 +100,7 @@ class PP < PrettyPrint https://github.com/ruby/ruby/blob/trunk/lib/pp.rb#L100 def sharing_detection Ractor.current[:pp_sharing_detection] end + # Sets the sharing detection flag to b. def sharing_detection=(b) Ractor.current[:pp_sharing_detection] = b end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/