Code Monkey home page Code Monkey logo

exercises-ruby's Introduction

exercises-ruby

Github Actions Status

How to contribute

Develop

# setup
make
# run
make compose
# check
make ci-check

# run tests
make compose-test

# run linters and validators
make compose-code-lint
make compose-description-lint
make compose-schema-validate

Hexlet Ltd. logo

This repository is created and maintained by the team and the community of Hexlet, an educational project. Read more about Hexlet.

See most active contributors on hexlet-friends.

exercises-ruby's People

Contributors

amshkv avatar ashikov avatar aydys avatar badta5te avatar burenkov-anton avatar chrtkv avatar corsicanec82 avatar dependabot[bot] avatar dzencot avatar ekulshan avatar fey avatar letzabelin avatar malcom1986 avatar melodyn avatar mjh-sakh avatar mokevnin avatar morozzzko avatar nick-bcm avatar ola-9 avatar orion122 avatar plugin73 avatar resh0607 avatar ssssank avatar sudobooo avatar svet-svet avatar unmyke avatar usernaimandrey avatar valeriyseregin avatar vladpurga avatar zhabinka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

exercises-ruby's Issues

Блок 'Строки' - endless range

Приветствую, незнаю насколько важно будет, у вас в блоке есть пример:

name[-4..]

Я иногда прогоняю примеры через repl.it чтобы посмотреть некоторые вещи которые меня интересуют и там данная конструкция вызывает syntax error по причине того что такой способ получения части строки валиден для Ruby 2.6 https://ruby-doc.org/core-2.6/Range.html#class-Range-label-Endless+Ranges
И видимо на repl.it версия оказалась ниже.
Возможно конечно сейчас уже не часто используют версию ниже 2.6, просто решил сообщить об этом, вдруг будет полезно и в description к блоку стоит пояснить об этом.

неверный пример дестракчеринга modules/20-collections/50-destructuring/description.ru.yml

data = ['hexlet', 'online courses', topics: ['php', 'js']]
[_, _, [first_topic]] = data

в irb ошибка

irb(main):016:0> [_, _, [first_topic]] = data
Traceback (most recent call last):
        3: from /home/feycot/.asdf/installs/ruby/3.0.0/bin/irb:23:in `<main>'
        2: from /home/feycot/.asdf/installs/ruby/3.0.0/bin/irb:23:in `load'
        1: from /home/feycot/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/irb-1.3.0/exe/irb:11:in `<top (required)>'
SyntaxError ((irb):16: syntax error, unexpected '=', expecting `end')
[_, _, [first_topic]] = data
                      ^

Ruby: Пайплайн test

Неверное количество родившихся в 2012 году в тесте, в секции Expected.
Сейчас
'2012' => 1
должно быть
'2012' => 3

some issues

  1. https://ru.code-basics.com/languages/ruby/lessons/everything-is-object
    Функция put() выводит любые типы данных без необходимости преобразования их в строку.
    Должно быть puts() вместо put()?

  2. https://ru.code-basics.com/languages/ruby/lessons/functions-definition-splat
    Splat-оператор может встречаться в определении функции только один раз и только в самом конце
    Нет ли ошибки в описании? Можно ведь и в середине Splat использовать, не только в конце или начале? Вот так:

def max(one_param, *numbers, another)
  numbers.max
end

puts max("что-то", 6, 31, -5, 45) # => 31
  1. https://ru.code-basics.com/languages/ruby/lessons/functions-pipline#output
    Валится тест:
function#test_0001_should works [test.rb:29]:
expected --- {"1973"=>3, "1963"=>1, "1980"=>2, "2012"=>1, "1999"=>1}

"2012" => 3 вроде

  1. https://ru.code-basics.com/languages/ruby/lessons/functions-blocks-as-objects
    перАдавая -> перЕдавая

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.