[前][次][番号順一覧][スレッド一覧]

ruby-changes:64427

From: Marc-Andre <ko1@a...>
Date: Tue, 22 Dec 2020 03:31:37 +0900 (JST)
Subject: [ruby-changes:64427] 8f2031a067 (master): Ractor#to_s as #inspect

https://git.ruby-lang.org/ruby.git/commit/?id=8f2031a067

From 8f2031a06725d32f59e5ecd88ede3f96e8c5e9b1 Mon Sep 17 00:00:00 2001
From: Marc-Andre Lafortune <github@m...>
Date: Mon, 21 Dec 2020 13:30:40 -0500
Subject: Ractor#to_s as #inspect


diff --git a/ractor.rb b/ractor.rb
index 772a0eb..c73c574 100644
--- a/ractor.rb
+++ b/ractor.rb
@@ -660,6 +660,8 @@ class Ractor https://github.com/ruby/ruby/blob/trunk/ractor.rb#L660
     "#<Ractor:##{id}#{name ? ' '+name : ''}#{loc ? " " + loc : ''} #{status}>"
   end
 
+  alias to_s inspect
+
   # The name set in Ractor.new, or +nil+.
   def name
     __builtin_cexpr! %q{RACTOR_PTR(self)->name}
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]