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

ruby-changes:65236

From: aycabta <ko1@a...>
Date: Thu, 11 Feb 2021 20:36:53 +0900 (JST)
Subject: [ruby-changes:65236] 6eb5b3ac27 (master): [ruby/irb] The command "irb_info" should show RUBY_PLATFORM

https://git.ruby-lang.org/ruby.git/commit/?id=6eb5b3ac27

From 6eb5b3ac27ceebc0c6a1306678377c016552c9ad Mon Sep 17 00:00:00 2001
From: aycabta <aycabta@g...>
Date: Tue, 9 Feb 2021 17:29:38 +0900
Subject: [ruby/irb] The command "irb_info" should show RUBY_PLATFORM

https://github.com/ruby/irb/commit/39d1cd874f
---
 lib/irb/cmd/info.rb  | 1 +
 test/irb/test_cmd.rb | 8 ++++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/lib/irb/cmd/info.rb b/lib/irb/cmd/info.rb
index 53ec71d..d122c88 100644
--- a/lib/irb/cmd/info.rb
+++ b/lib/irb/cmd/info.rb
@@ -13,6 +13,7 @@ module IRB https://github.com/ruby/ruby/blob/trunk/lib/irb/cmd/info.rb#L13
             str += "IRB version: #{IRB.version}\n"
             str += "InputMethod: #{IRB.CurrentContext.io.inspect}\n"
             str += ".irbrc path: #{IRB.rc_file}\n" if File.exist?(IRB.rc_file)
+            str += "RUBY_PLATFORM: #{RUBY_PLATFORM}\n"
             str
           end
           alias_method :to_s, :inspect
diff --git a/test/irb/test_cmd.rb b/test/irb/test_cmd.rb
index 7219473..41f84f1 100644
--- a/test/irb/test_cmd.rb
+++ b/test/irb/test_cmd.rb
@@ -48,7 +48,8 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_cmd.rb#L48
         Ruby\sversion: .+\n
         IRB\sversion:\sirb .+\n
         InputMethod:\sReidlineInputMethod\swith\sReline .+ and .+\n
-        \.irbrc\spath: .+
+        \.irbrc\spath: .+\n
+        RUBY_PLATFORM: .+
       }x
       assert_match expected, irb.context.main.irb_info.to_s
     end
@@ -67,7 +68,8 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_cmd.rb#L68
         Ruby\sversion: .+\n
         IRB\sversion:\sirb .+\n
         InputMethod:\sReadlineInputMethod\swith .+ and .+\n
-        \.irbrc\spath: .+
+        \.irbrc\spath: .+\n
+        RUBY_PLATFORM: .+
       }x
       assert_match expected, irb.context.main.irb_info.to_s
     end
@@ -89,6 +91,7 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_cmd.rb#L91
         Ruby\sversion: .+\n
         IRB\sversion:\sirb .+\n
         InputMethod:\sReidlineInputMethod\swith\sReline\s[^ ]+(?!\sand\s.+)\n
+        RUBY_PLATFORM: .+\n
         \z
       }x
       assert_match expected, irb.context.main.irb_info.to_s
@@ -115,6 +118,7 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_cmd.rb#L118
         Ruby\sversion: .+\n
         IRB\sversion:\sirb .+\n
         InputMethod:\sReadlineInputMethod\swith\s(?~.*\sand\s.+)\n
+        RUBY_PLATFORM: .+\n
         \z
       }x
       assert_match expected, irb.context.main.irb_info.to_s
-- 
cgit v1.1


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

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