All Practice Exams

100+ Free Ruby Programmer Silver Practice Questions

Pass your Ruby Association Certified Ruby Programmer Silver (version 3) exam on the first try — instant access, no signup required.

✓ No registration✓ No credit card✓ No hidden fees✓ Start practicing immediately
100+ Questions
100% Free
1 / 100
Question 1
Score: 0/0

What does `[3, 1, 2].sort { |a, b| b <=> a }` return?

A
B
C
D
to track
Same family resources

Explore More Ruby Programming Certifications

Continue into nearby exams from the same family. Each card keeps practice questions, study guides, flashcards, videos, and articles in one place.

2026 Statistics

Key Facts: Ruby Programmer Silver Exam

USD 150

Exam Fee

Ruby Association

75% (38/50)

Passing Score

Ruby Association

50 questions

Question Count

Ruby Association

90 minutes

Time Limit

Ruby Association

Ruby 3.1.x

Target Version

Ruby Association

No expiry

Validity

Ruby Association

The Ruby Association Certified Ruby Programmer Silver exam is a foundational Ruby 3.1 credential with a USD 150 fee, 50 multiple-choice questions, a 90-minute limit, and a 75% (38 of 50) passing score. It is delivered onsite by Prometric and has no expiration. The three scope areas are Syntax (comments, literals, operators, control flow, exceptions, methods, blocks, keyword arguments), Object orientation (classes, modules, visibility, inheritance, polymorphism, mix-ins), and Built-in libraries (Object, Numeric, String, Array, Hash, Kernel, Comparable, Enumerable). Silver must be passed before attempting Gold.

Sample Ruby Programmer Silver Practice Questions

Try these sample questions to test your Ruby Programmer Silver exam readiness. Each question includes a detailed explanation. Start the interactive quiz above for the full 100+ question experience with AI tutoring.

1In Ruby, which of the following values is treated as truthy in a conditional such as `if x`?
A.nil
B.false
C.an empty string ""
D.0
Explanation: In Ruby, only `nil` and `false` are falsy. Every other object, including the integer 0 and an empty string, evaluates as truthy in a conditional. This differs from languages like C or Python where 0 or empty containers are falsy.
2What does the following code print? ```ruby name = "Ruby" puts "Hello, #{name}!" puts 'Hello, #{name}!' ```
A.Hello, Ruby!\nHello, Ruby!
B.Hello, #{name}!\nHello, #{name}!
C.Hello, #{name}!\nHello, Ruby!
D.Hello, Ruby!\nHello, #{name}!
Explanation: Double-quoted strings perform interpolation, so `#{name}` is replaced by the variable's value, giving `Hello, Ruby!`. Single-quoted strings do not interpolate, so `#{name}` is printed literally. The first line interpolates and the second does not.
3What is the decimal value of the integer literal `0o17` (also writable as `017`) in Ruby?
A.17
B.15
C.23
D.8
Explanation: A leading `0o` (or a bare leading `0`) marks an octal literal. The digits 17 in base 8 equal 1 x 8 + 7 = 15 in decimal. Ruby also supports `0b` for binary, `0x` for hexadecimal, and `0d` or no prefix for decimal.
4Which of the following is NOT a valid local variable name in Ruby?
A.2count
B.count2
C._count
D.my_count
Explanation: Local variable names must begin with a lowercase letter or an underscore, then may contain letters, digits, and underscores. `2count` starts with a digit, which is invalid. The other three follow the naming rules.
5Given `CONST = 1`, what happens when this code runs? ```ruby CONST = 1 CONST = 2 puts CONST ```
A.Raises a SyntaxError and prints nothing
B.Prints 1 and raises a runtime error
C.Prints 2 but emits a warning about an already-initialized constant
D.Prints nothing because constants are frozen
Explanation: Reassigning a constant in Ruby is allowed but produces the warning `already initialized constant CONST`. The reassignment still succeeds, so `CONST` becomes 2 and is printed. Reassignment is a warning, not an error.
6What does this ternary expression evaluate to? ```ruby x = 10 result = x > 5 ? "big" : "small" ```
A."small"
B.nil
C.true
D."big"
Explanation: The ternary operator `condition ? a : b` returns `a` when the condition is truthy and `b` otherwise. Since `10 > 5` is true, `result` becomes the string `"big"`.
7What does the following case expression print? ```ruby score = 85 case score when 0..59 then puts "F" when 60..79 then puts "C" when 80..100 then puts "A" end ```
A.F
B.C
C.A
D.nil
Explanation: A `case/when` with ranges uses the case equality operator `===`, so `(80..100) === 85` is true. The third branch matches and prints `A`. Range `===` tests membership via `include?`.
8What is printed after this loop? ```ruby sum = 0 3.times do |i| sum += i end puts sum ```
A.6
B.0
C.3
D.1
Explanation: `Integer#times` yields the values 0, 1, and 2 to the block. Adding them gives 0 + 1 + 2 = 3. The block parameter starts at 0, not 1, which is a common point of confusion.
9Which keyword definitively reserved in Ruby cannot be used as a local variable name?
A.class
B.rand
C.puts
D.each
Explanation: `class` is a reserved word in Ruby and cannot be used as an identifier. `each`, `rand`, and `puts` are method names, not reserved words, so they could technically be used as local variable names (though it is poor style).
10What does the conditional assignment operator `||=` do in `count ||= 0`?
A.Assigns 0 to count only if count is currently nil or false
B.Always assigns 0 to count, overwriting any prior value
C.Raises an error if count is already defined
D.Adds 0 to the current value of count
Explanation: `count ||= 0` is roughly equivalent to `count || (count = 0)`: it assigns 0 only when `count` is nil or false. If `count` already holds a truthy value, it is left unchanged. This is the common idiom for default values.

About the Ruby Programmer Silver Exam

The Ruby Association Certified Ruby Programmer Silver examination is a foundational, vendor-neutral certification verifying core knowledge of the Ruby programming language, assessed against Ruby 3.1. It covers the syntax, classes, objects, and standard libraries of Ruby. The exam contains 50 multiple-choice questions, allows 90 minutes, and requires 75% (38 correct) to pass. It is administered onsite at Prometric test centers, and passing Silver is a prerequisite for the more advanced Gold certification.

Questions

50 scored questions

Time Limit

90 minutes

Passing Score

75% (38 of 50)

Exam Fee

USD 150 (Ruby Association (delivered via Prometric))

Ruby Programmer Silver Exam Content Outline

~35%

Syntax

Comments and literals; variables, constants, and scope; operators; conditional branching with if/elsif/else and case/when; loops; exception handling with begin/rescue/ensure; method calls and definitions including default and keyword arguments; and blocks.

~25%

Object orientation

Defining classes and modules; instance, class, and global variables; method visibility (public, private, protected); inheritance and super; polymorphism and duck typing; and mix-ins through include and extend.

~40%

Built-in libraries

Well-used built-in classes and modules: Object, Numeric, String, Array, Hash, Kernel, Comparable, and Enumerable (map, select, inject, find, sort), plus regular expressions and basic file and directory I/O.

How to Pass the Ruby Programmer Silver Exam

What You Need to Know

  • Passing score: 75% (38 of 50)
  • Exam length: 50 questions
  • Time limit: 90 minutes
  • Exam fee: USD 150

Keys to Passing

  • Complete 500+ practice questions
  • Score 80%+ consistently before scheduling
  • Focus on highest-weighted sections
  • Use our AI tutor for tough concepts

Ruby Programmer Silver Study Tips from Top Performers

1Run real Ruby code: open irb and test each Array, Hash, and String method, since many questions ask you to predict exact output.
2Master the difference between mutating bang methods (sort!, upcase!, reject!) and their non-bang counterparts that return new objects.
3Know Enumerable cold: map, select, reject, find, inject/reduce, each_with_index, group_by, all?/any?/none?, min, and max all appear frequently.
4Memorize truthiness (only nil and false are falsy), integer vs float division, octal/hex/binary literals, and how string interpolation differs between single and double quotes.
5Practice exception flow: rescue clause ordering by inheritance, the always-runs ensure block, and that a bare raise creates a RuntimeError caught by a bare rescue.
6Work through the official Ruby Association prep-test (silver.md); the real exam closely mirrors its style, with some questions asking you to choose two or more answers.

Frequently Asked Questions

What are the current exam facts for Ruby Silver?

The Ruby Association Certified Ruby Programmer Silver exam costs USD 150, has 50 multiple-choice questions, allows 90 minutes, and requires 75% (38 of 50) to pass. It is assessed against Ruby 3.1 and delivered onsite by Prometric.

Which Ruby version does the Silver exam test?

The current Silver (version 3) exam is assessed against Ruby 3.1.x. Questions focus on syntax, object orientation, and well-used built-in classes and modules at a foundational level.

What topics does the Ruby Silver exam cover?

The three scope areas are Syntax (literals, operators, control flow, exceptions, methods, blocks), Object orientation (classes, modules, visibility, inheritance, polymorphism, mix-ins), and Built-in libraries (Object, Numeric, String, Array, Hash, Kernel, Comparable, Enumerable).

Do I need Silver before taking the Gold exam?

Yes. You must pass the Ruby Association Certified Ruby Programmer Silver exam before you are eligible to attempt the Gold exam, which adds metaprogramming, refinements, and standard-library topics.

Does the Ruby Silver certification expire?

No. The Ruby Association Certified Ruby Programmer Silver certification does not expire and requires no periodic renewal once earned.

How is the Ruby Silver exam delivered?

The exam is taken on a computer onsite at a Prometric test center, registered through Prometric's system. Results appear immediately after you finish, and the certificate is emailed about a week later.