docs: clarify default parameter behavior in section Quickening it Up and fix Portuguese translation typo

未关闭
#264 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

@MatheoPaiva 已经在做这个了。

开始于 2026年11月15日。

  • #266 来自 @MatheoPaiva —— 未关闭

评估

难度
1/5
预计耗时
1 小时以内
新手友好度
40/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
停滞
技术栈
ruby
领域
documentation

调研方向

Open the "Quickening it Up" section of the tutorial and its Portuguese counterpart, and locate the paragraph describing the initialize default argument (content="" / conteudo=""). Compare the two texts: the English one needs the wording softened to say the default only applies when the argument is omitted, and the Portuguese one additionally carries a stray __. Make the prose match across translations with consistent inline code around parameter names, then view the rendered pages to confirm. Note an open pull request (#266) already targets this, so check it before starting to avoid duplicate work.

由索引模型根据 Issue 内容生成。

描述

Section: Quickening it Up

Description

The Ruby tutorial's explanation of the initialize method contains two issues:

1. Misleading explanation (identified in both English and Portuguese)

Both versions suggest that the default argument (content="" / conteudo="") guarantees the parameter is a string.

image

However, the default value only applies when the argument is omitted. Passing nil or another incompatible value explicitly can still cause an error.

Suggested wording (English):

"The default value content="" ensures that content is an empty string when no argument is provided."

Suggested wording (Portuguese):

"O valor padrão conteudo="" garante que conteudo seja uma string vazia quando nenhum argumento for informado."

2. Formatting typo (Portuguese only)

The Portuguese translation contains an unexpected __ in the paragraph explaining the default parameter. This does not appear in others version.

image
Expected behavior
  • Both translations accurately describe Ruby's default argument behavior.
  • The Portuguese version no longer contains the unintended __.
  • Parameter names and values use consistent inline code formatting.
主要语言
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 摘要。