diff options
-rw-r--r-- | lib/irb/cmd/info.rb | 1 | ||||
-rw-r--r-- | 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 53ec71d754..d122c88b77 100644 --- a/lib/irb/cmd/info.rb +++ b/lib/irb/cmd/info.rb @@ -13,6 +13,7 @@ module IRB 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 7219473e4c..41f84f1922 100644 --- a/test/irb/test_cmd.rb +++ b/test/irb/test_cmd.rb @@ -48,7 +48,8 @@ module TestIRB 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 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 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 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 |