Skip to content

[RU] examples: improvements #2037

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions ru/examples/cities.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ layout: null
# что вы имеете в виду,
# даже если вы хотите производить
# вычисления на целом массиве.
cities = %w[ London
Oslo
Paris
Amsterdam
Berlin ]
visited = %w[Berlin Oslo]
cities = %w[ Лондон
Осло
Париж
Амстердам
Берлин ]
visited = %w[Берлин Осло]

puts "I still need " +
"to visit the " +
"following cities:",
puts "Я ещё хочу " +
"посетить " +
"следующие города:",
cities - visited
{% endhighlight %}
6 changes: 3 additions & 3 deletions ru/examples/greeter.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ class Greeter
end

def salute
puts "Hello #{@name}!"
puts "Привет, #{@name}!"
end
end

# Создаем новый объект
g = Greeter.new("world")
g = Greeter.new("мир")

# Результат будет "Hello World!"
# Результат будет "Привет, Мир!"
g.salute
{% endhighlight %}
10 changes: 5 additions & 5 deletions ru/examples/i_love_ruby.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ layout: null
---

{% highlight ruby %}
# Результат выполнения: "I love Ruby"
say = "I love Ruby"
# Результат выполнения: "Мне нравится Ruby"
say = "Мне нравится Ruby"
puts say

# Результат выполнения: "I *LOVE* RUBY"
say['love'] = "*love*"
# Результат выполнения: "МНЕ *НРАВИТСЯ* RUBY"
say['нравится'] = "*нравится*"
puts say.upcase

# Результат выполнения: пять раз выводится
# "I *love* Ruby"
# "Мне *нравится* Ruby"
5.times { puts say }
{% endhighlight %}