Free Ruby Association Certified Ruby Programmer Gold Practice Questions
100 free questions · Answer explanations · No signup required
View examination details, outline and sourcesLoading selected examination banks…
Sample Practice Questions
Try these 10 sample questions from the Ruby Association Certified Ruby Programmer Gold practice bank. Each includes the answer and explanation. Continue with the interactive practice above to review the full question set.
1Which predefined object contains arguments passed to a Ruby script?
- A.ARGVCorrect answer: A
- B.ARGF
- C.ENV
- D.STDIN
2What is the value of `%i[open close]` in Ruby 3.1?
- A.[:open, :close]Correct answer: A
- B.["open", "close"]
- C.:"open close"
- D."open close"
Explanation: The Ruby documentation states: "You can write an array of symbols with %i (non-interpolable) or %I (interpolable):". Each whitespace-separated word becomes a symbol; this is neither a string array nor a single symbol or string.
Reference: Ruby 3.1 %i and %I: Symbol-Array Literals documentation — %i and %I: Symbol-Array Literals
3What is the value of `def total; 2 + 6; end; total`?
- A.8Correct answer: A
- B.nil
- C.2
- D.6
4A diagnostic tool knows an instance-variable name at runtime, including its @ prefix. Which method reads that variable directly?
- A.const_get
- B.class_variable_get
- C.public_send
- D.instance_variable_getCorrect answer: D
Explanation: The Ruby documentation states: "Returns the value of the given instance variable, or nil if the instance variable is not set.". instance_variable_get reads the named instance variable; constants, class variables, and method dispatch are different operations.
Reference: Ruby 3.1 instance_variable_get documentation — instance_variable_get
5Which Enumerable method groups elements into a hash keyed by the block's return values?
- A.partition
- B.map
- C.group_byCorrect answer: C
- D.select
6After a class includes Singleton, how should callers obtain its shared instance?
- A.Call new for each access.
- B.Call instance on the class.Correct answer: B
- C.Call allocate on the class.
- D.Call dup on the class.
7A loader needs the directories Ruby searches for required scripts and extensions. Which global provides that search path?
- A.$LOADED_FEATURES
- B.$LOAD_PATHCorrect answer: B
- C.$FILENAME
- D.$DEBUG
Explanation: The Ruby documentation states: "Load path for searching Ruby scripts and extension libraries used by Kernel#load and Kernel#require.". $LOAD_PATH controls search locations. Loaded features record prior loads; the other globals do not supply directories.
8Which Ruby literal represents the exact rational value three tenths?
- A.0.3
- B.0.3rCorrect answer: B
- C.3i
- D.0x3
9A setter stores its argument but explicitly returns :stored. What does the assignment expression `obj.value = 12` evaluate to?
- A.:stored
- B.12Correct answer: B
- C.nil
- D.obj
Explanation: The Ruby documentation states: "Note that for assignment methods the return value will be ignored when using the assignment syntax. Instead, the argument will be returned:". Assignment syntax yields the assigned value, not the setter's explicit method return.
Reference: Ruby 3.1 Return Values documentation — Return Values
10A class wants to install an instance method using a runtime name and a block as its body. Which method supports this?
- A.define_methodCorrect answer: A
- B.define_singleton_method
- C.const_set
- D.instance_variable_set
Exam Review
About Ruby Association Certified Ruby Programmer Gold
Ruby Association Certified Ruby Programmer Gold · UNSPECIFIED
Key exam facts
- Provider
- Ruby Association owns and certifies the examination; Prometric administers it at test centers.
- Format
- Computer Based Testing with multiple-choice questions.
- Exam questions
- Total questions: 50.
- Time limit
- 90 minutes of examination time.
- Passing score
- 75%.
- Exam fee
- Japan: JPY 16,500 including tax, with a separate student discount. The English owner page lists USD 150 with an Education Pricing link; this is not a universal converted price. A Japan retake campaign offers a free second attempt after failure, by application through 23 December 2026 and retake by 28 December 2026, subject to its conditions.
Topics covered
Execution environment
- Pre-defined variables and constants
Syntax
- Literals
- Variables and constants
- Operators
- Blocks
- Exceptions
- Non local exit
- Keyword arguments
- Numbered parameters
- lambda
- Pattern matching
- Here documents
Object Oriented Programing
- Details of Method
- Access control
- Details of Class
- Class inheritance
- Details of modules
- Module#prepend
- Refinements
Metaprograming
Built-in libraries
- Well-used built-in classes and modules (e.g., Object, Module, Kernel, Enumerable, Comparable)
- Numeric
- Regular expression
- Proc
- Enumerator
Standard Library
How to prepare
Work through the topics, read the explanation after each answer, and revisit the areas where you miss questions. Use the official outline and reference materials below to guide your study.
These independent practice questions are not actual exam items and do not guarantee a passing result.
Frequently asked questions
What is the exam format?
Computer Based Testing with multiple-choice questions.
How many questions are on the exam?
Total questions: 50.
How long is the exam?
90 minutes of examination time.
What is the passing score?
75%.
How much does the exam cost?
Japan: JPY 16,500 including tax, with a separate student discount. The English owner page lists USD 150 with an Education Pricing link; this is not a universal converted price. A Japan retake campaign offers a free second attempt after failure, by application through 23 December 2026 and retake by 28 December 2026, subject to its conditions.
Official sources and references
- Ruby Association examination overview
Outline of examination — Gold — Scope
- Ruby Association official information
Schedule
- Ruby Association examination overview
Outline of examination — Gold
Confirm current exam arrangements with the exam provider.