Example code is incorrect in lesson 40

未關閉
#85 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
1/5
預估耗時
1 小時以內
新手友好度
35/100
Issue 類型
文件
描述清晰度
描述清楚
活躍度
停滯
技術堆疊
ruby
領域
documentation

研究方向

開啟 source/try_ruby_en.json 的第 41 行,並將課程文字與其範例程式碼進行比較。確認範例使用課程要求的年份,且執行時不會出現回報的錯誤。當課程範例與其指示一致時,即表示完成。

由索引模型根據 Issue 內容生成。

描述

https://github.com/ruby/TryRuby/blob/84ec432786e9f38dc27477f974583d6a7710be30/source/try_ruby_en.json#L41

The text in this lesson is asking the user to find the number of plays Shakespeare wrote in 1591 using the count_plays method, but in the example code, count_plays is called with a year value of 0. As a result the code errors if not modified.

The last line of the example code should read as follows:

puts count_plays(1591)

If nobody else beats me to it, I'll gladly open a PR for this when I have a bit more time.

主要語言
Ruby
星號
258
分支
113
PR 合併指標
30 天內沒有已合併 PR

環境準備

  • 提供 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 沒有貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

ruby/TryRuby 的其他 Issue

查看 ruby/TryRuby 的全部 Issue

相似的 Issue

更多 Ruby Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。