Add ruby irb.rb script on Windows install
維護者通常 2 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
先檢查 Windows 中安裝的 irb 和 irb.bat 啟動器,重點了解嵌入式 Ruby 指令碼是如何提供的。新增一個支援所示命令 ruby.exe -x irb.rb 的 irb.rb 啟動器,然後驗證無需另外安裝 Ruby 即可從 WSL 啟動 IRB。
由索引模型根據 Issue 內容生成。
描述
Description
I was expecting that there would also be a irb.rb script, in addition to irb or irb.bat. So that one can run the Windows IRB also from within WSL, without having to install Ruby separately in WSL.
This can be done, by extracting the embedded ruby script from inside the irb file. y
cat irb.rb:
#!/usr/bin/env ruby
#
# This file was generated by RubyGems.
#
# The application 'irb' is installed as part of a gem, and
# this file is here to facilitate running it.
#
require 'rubygems'
Gem.use_gemdeps
version = ">= 0.a"
str = ARGV.first
if str
str = str.b[/\A_(.*)_\z/, 1]
if str and Gem::Version.correct?(str)
version = str
ARGV.shift
end
end
if Gem.respond_to?(:activate_bin_path)
load Gem.activate_bin_path('irb', 'irb', version)
else
gem "irb", version
load Gem.bin_path("irb", "irb", version)
end
Now you can run it with: ruby.exe -x irb.rb.
Result of irb_info
Ruby version: 3.1.0
IRB version: irb 1.4.1 (2021-12-25)
InputMethod: ReidlineInputMethod with Reline 0.3.0
RUBY_PLATFORM: x64-mingw-ucrt
East Asian Ambiguous Width: 1
Code page: 65001
Terminal Emulator
What's your terminal emulator?
Any
Setting Files
Are you using ~/.irbrc and ~/.inputrc?
NO
- 主要語言
- Ruby
- 星號
- 477
- 分支
- 165
- 平均合併
- 1 天 19 小時
- 30 天內合併 PR
- 5
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
ruby/irb 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 68/100
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 45/100
維護者通常 2 天內回覆
-
Proposal: public hook for external documentation providers in show_doc and the completion doc dialog可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 5/5 一週以上 新手友好度 38/100
維護者通常 2 天內回覆
-
難度 5/5 一週以上 新手友好度 35/100
維護者通常 2 天內回覆
相似的 Issue
-
Update axe-core to v4.14.1可能已有人在做 @axe-core 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
dequelabs/axe-core-gems#539 ·
-
Pro request form loses all text when the subject is too long可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉bug f:request-creation professional
難度 2/5 1-3 小時 新手友好度 64/100
mysociety/alaveteli#9733 · 1 則留言 ·
維護者通常 1 天內回覆
-
needs verification
難度 2/5 1-3 小時 新手友好度 64/100
維護者通常 13 天內回覆
-
🐛 bug 👩💻 équipe CE 🧑🏭 entreprises
難度 2/5 1-3 小時 新手友好度 76/100
betagouv/conseillers-entreprises#4808 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100