Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Ruby Certification Exam Preparation

2,906 views

Published on

Collection of hints, screenshots from sites which provided some exam simulations, adding some comments and the correct answers.

Published in: Technology

Ruby Certification Exam Preparation

  1. 1. Ruby 1.8.7 Exam Hell Curse By Sir Flavio, the Vit Doomed to learn this crap prog lang
  2. 2. Scope • The execution environment Execution method • Literal Conditional branching Method calls Class definition Variables, constants, and scope Loops Blocks Module definition Built-in libraries Built-in functions • Environment variables Syntax Comment Operators Exception handling Method definition • Command-line options Built-in classes Object orientation Polymorphism Inheritance mix-in irb
  3. 3. Crap links • http://www.ruby.or.jp/en/certification/examin ation/ • http://ruby-doc.org/core-1.8.7/ • http://www.minituku.net/ • http://rexaminator.com/ • http://www.brainbench.com/xml/bb/common /testcenter/consumer/taketest.xml?testId=29 67
  4. 4. Answer: Identical … Symbol objects with same string are identical.
  5. 5. Crap … for sure it it returned a new string. Important to notice is that formbody is not changed. gsub! In other hand will mutate the original string.
  6. 6. While loop with a negated condition
  7. 7. Recursion
  8. 8. String.gsub
  9. 9. Anything but false or nil
  10. 10. Whenever a float is used, the result will be float, otherwise Truncation will happen
  11. 11. Ruby sucks! There is no x++ x-- ++x –x as in Java and C
  12. 12. Stat can be used to compare modification times.
  13. 13. This will iterate over the tenths: 0.step(10,0.1) {|i| puts i}
  14. 14. Procs in Ruby are drop in code snippets, not methods. Because of this, the Proc return is the proc_return method’s return, and acts accordingly. Lambdas however act just like methods, as they check the number of arguments and do not override the calling methods return.

×