ruby / ruby/TryRuby

Example code is incorrect in lesson 40

Open
#85 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
256
Forks
110
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open source/try_ruby_en.json at line 41 and compare the lesson text with its example code. Confirm that the example uses the year requested by the lesson and runs without the reported error. Done means the lesson's example is consistent with its instruction.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.