Ruby Intermediate Interview Questions
  1. Explain the concept of metaclasses in Ruby.
  2. What is a lambda in Ruby?
  3. What is the difference between Proc and lambda?
  4. Explain the use of iterators in Ruby.
  5. What is the difference between include and extend in Ruby?
  6. How do you implement exception handling in Ruby?
  7. Explain the concept of Mixins in Ruby.
  8. What are the different types of variables available in Ruby?
  9. What is the use of the ‘self’ keyword in Ruby?
  10. What is a callback in Ruby?
  11. What is the difference between a hash and an array in Ruby?
  12. What is the use of the ‘case’ keyword in Ruby?
  13. What is the difference between a private and a protected method in Ruby?
  14. How do you create a custom exception class in Ruby?
  15. What is the use of the ‘alias’ keyword in Ruby?
  16. How do you implement multithreading in Ruby?
  17. What is the use of the ‘superclass’ method in Ruby?
  18. What is the use of the ‘self.included’ method in Ruby?
  19. How do you use Regular Expressions in Ruby?
  20. What is the use of the ‘retry’ keyword in Ruby?
  21. Explain the concept of continuations in Ruby.
  22. What is the difference between a lambda and a proc object in Ruby?
  23. What is the difference between ‘def’ and ‘define_method’ in Ruby?
  24. How do you implement the ‘Enumerable’ module in Ruby?
  25. What is the difference between ‘ObjectSpace’ and ‘GC’ modules in Ruby?
  26. Explain the concept of singleton methods in Ruby.
  27. What is the difference between an ‘if’ statement and a ‘ternary operator’ in Ruby?
  28. How do you implement a custom Enumerator in Ruby?
  29. Explain the concept of ‘Symbol GC’ in Ruby.
  30. What is the difference between a ‘Mutex’ and a ‘Semaphore’ in Ruby?
  31. How do you implement a custom ‘Enumerable’ module in Ruby?
  32. Explain the concept of ‘Eigenclass’ in Ruby.
  33. What is the difference between ‘Thread’, ‘Fiber’ and ‘Actor’ in Ruby?
  34. How do you implement a custom ‘Comparable’ module in Ruby?
  35. Explain the concept of ‘Splat operator’ in Ruby.
  36. How do you implement concurrency in Ruby?
  37. Explain the concept of lazy evaluation in Ruby.
  38. How do you implement an Observer pattern in Ruby?
  39. What is the difference between a ‘has_one’ and a ‘belongs_to’ association in Ruby on Rails?
  40. What is the difference between a ‘before_filter’ and an ‘after_filter’ in Ruby on Rails?
Ruby Interview Questions For Experienced
  1. Explain the difference between Proc, lambda and method in Ruby.
  2. What is the difference between a class and a module in Ruby?
  3. Explain the use of the ‘super’ keyword in Ruby.
  4. What is the difference between threads and processes in Ruby?
  5. What is a singleton class in Ruby?
  6. What is the difference between a shallow copy and a deep copy in Ruby?
  7. How do you use Ruby to interact with databases?
  8. Explain the concept of object serialization in Ruby.
  9. What are some of the best practices for writing efficient Ruby code?
  10. How do you design a RESTful API using Ruby on Rails?
  11. Explain the concept of Refinements in Ruby.
  12. What is the difference between a block and a lambda in Ruby?
  13. How do you implement memoization in Ruby?
  14. What is the use of the ‘FILE’ keyword in Ruby?
  15. Explain the concept of Monkey Patching in Ruby.
  16. What is the difference between ‘puts’, ‘print’, and ‘p’ in Ruby?
  17. How do you implement a custom iterator in Ruby?
  18. Explain the concept of Fibers in Ruby.
  19. How do you use the ‘tap’ method in Ruby?
  20. What is the difference between ‘dup’ and ‘clone’ methods in Ruby?
  21. Explain the concept of continuations in Ruby.
  22. What is the difference between a lambda and a proc object in Ruby?
  23. What is the difference between ‘def’ and ‘define_method’ in Ruby?
  24. How do you implement the ‘Enumerable’ module in Ruby?
  25. What is the difference between ‘ObjectSpace’ and ‘GC’ modules in Ruby?
  26. Explain the concept of singleton methods in Ruby.
  27. What is the difference between an ‘if’ statement and a ‘ternary operator’ in Ruby?
  28. How do you implement a custom Enumerator in Ruby?
  29. Explain the concept of ‘Symbol GC’ in Ruby.
  30. What is the difference between a ‘Mutex’ and a ‘Semaphore’ in Ruby?
  31. Explain the concept of Closures in Ruby.
  32. What is the difference between a class method and an instance method in Ruby?
  33. How do you implement a custom ‘Marshal’ format in Ruby?
  34. Explain the concept of ‘Y combinator’ in Ruby.
  35. What is the difference between a ‘gem’ and a ‘plugin’ in Ruby?
  36. How do you implement a custom ‘Enumerable’ module in Ruby?
  37. Explain the concept of ‘Eigenclass’ in Ruby.
  38. How do you implement an Active Record pattern in Ruby on Rails?
  39. Explain the concept of ‘N+1 query problem’ in Ruby on Rails.
  40. How do you implement versioning in RESTful APIs using Ruby on Rails?
  41. What is the use of the ‘rails generate’ command in Ruby on Rails?
  42. Explain the concept of ‘strong parameters’ in Ruby on Rails.