Quizzes

Ruby quizzes

Choose a quiz and test your understanding of a focused concept.

How to Check if a Value Exists in an Array in Ruby Quiz

Test your Ruby knowledge of checking array membership with include?, common mistakes, examples, and practical use cases.

How to Get the Current Absolute URL in Ruby on Rails Quiz

Test your understanding of getting the current absolute URL in Rails using request.url, path vs fullpath, and common URL mistakes.

How to Pass Command Line Arguments to a Rake Task in Ruby Quiz

Test your understanding of passing command line arguments to Rake tasks in Ruby, including invoke, env vars, quoting, and pitfalls.

Ruby Case Statement Quiz: Write Switch Logic the Ruby Way

Test your understanding of Ruby's `case` expression, `when` branches, return values, common mistakes, and switch-style logic.

Ruby Shell Commands Quiz: Run Commands and Capture Output

Test your understanding of running shell commands in Ruby with system, backticks, %x, and Open3 capture methods.

Ruby String Case Conversion Quiz: downcase, upcase, and ! Methods

Test your Ruby knowledge of downcase, upcase, capitalize, and destructive vs non-destructive string methods.

Ruby on Rails Quiz: nil? vs empty? vs blank? Explained

Test your understanding of nil?, empty?, and blank? in Ruby and Rails with practical examples, mistakes, outputs, and usage scenarios.

RubyGems .gemrc Quiz: Disable RI and RDoc by Default for gem install

Test your knowledge of configuring RubyGems with .gemrc to disable RI, RDoc, or documentation by default for gem install.

Understanding the Rails Authenticity Token Quiz

Test your knowledge of the Rails authenticity token, CSRF protection, forms, fetch requests, and common security mistakes.

What attr_accessor Means in Ruby: Getters and Setters Quiz

Test your understanding of Ruby attr_accessor, getters, setters, attr_reader, and common mistakes with clear examples.