[ruby-core:84026] [Ruby trunk Feature#14123] Kernel#pp by default

From: mame@...
Date: 2017-12-01 11:55:53 UTC
List: ruby-core #84026
Issue #14123 has been updated by mame (Yusuke Endoh).


akr-san, thank you!

Eregon, I think `$VERBOSE` dance is also thread-unsafe.  So I personally like `Warning.ignore` if it is thread-local.  I don't know how difficult it is to implement, though.

----------------------------------------
Feature #14123: Kernel#pp by default
https://bugs.ruby-lang.org/issues/14123#change-68109

* Author: mame (Yusuke Endoh)
* Status: Closed
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
* Target version: 2.5
----------------------------------------
Matz, may I commit this?  I really want this.

```
diff --git a/prelude.rb b/prelude.rb
index 7b98e28285..87f49ac9fb 100644
--- a/prelude.rb
+++ b/prelude.rb
@@ -141,3 +141,11 @@ def irb
     irb
   end
 end
+
+module Kernel
+  def pp(*objs)
+    undef :pp
+    require 'pp'
+    pp(*objs)
+  end
+end
```



-- 
https://bugs.ruby-lang.org/

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

In This Thread

Prev Next