Ruby面試精選30題 - 題目大綱
自從Oct-Nov.2018這段時間在Sydney將IT邦鐵人賽完賽之後,一直在想如何將這30篇文章做最佳利用。目前訂閱我的30天修煉Ruby面試精選30題系列的人超乎想像熱烈(30篇文章,共有26人訂閱),對於首次參加鐵人賽完賽的作者來說是很大的鼓勵。謝謝觀眾們!
這篇文章是個Ruby面試題列表,希望整理過後可以幫到未來面試的我和你們。

01
什麼是類別?
What is a Class?
02
類別與模組有什麼不同?
What’s the Difference Between aClassand aModule?
03
包含與延伸有什麼不同?
What’s the Difference Betweenincludeandextend?
04
請解釋實體方法與類別方法?
Explaininstance methodandclass method.
05
self是什麼意思?
What doesselfmean?
06
請說明Ruby的三種存取限制。
Explain 3 levels ofaccess controlfor Ruby methods.
07
符號和字串有什麼不同?
What’s difference betweensymbolandstring?
08
+=和concat有什麼不同?
What’s difference betweenconcatand+=?
09
請解釋 a ||= b?
Explain this ruby idiom (or-equals) :a ||= b?
10
Ruby如何引入方法?
Please explain how Ruby looks up a method toinvoke?
11
Ruby 的 block, proc, lamdba方法比較?
What’s difference betweenblocks,procsandlambdas?
12
Ruby 的 類別變數與類別實體變數,與實體變數有何不同?
What is difference betweenclass variable,class instance variableandinstance variable?
13
instance_eval 和 class_eval 的差別 ?
What’s the difference betweeninstance_evalandclass_eval?
14
each, map 和 collect 比較?
What’s the difference between each, map and collect?
15
alias 和 alias_method比較?
What’s the difference between alias和 alias_method?
16
什麼是迭代器? 請解釋Ruby裡面有哪幾種迭代器?
What’sIterator? How many iterators are there in Ruby?
17
解釋Ruby裡的 freeze 和 ?frozen。
Explan when to usefreezeandfrozenin Ruby?
18
如何在Ruby寫下多行字串?
How to writemultiline stringin Ruby?
19
描述Ruby裡的yield用法?
What isyieldstatement in Ruby?
20
說明Ruby裡Enumerable的實用之處?
Why IsEnumerableSo Useful?
21
解釋Ruby裡的True, False與Nil?
Explan True and False vs.TruthyandFalsey / Falsyin Ruby?
22
[and], [or] 和 [&&], [||] 比較?
What’s the difference between[and],[or]and[&&],[||]?
23
解釋Ruby裡的 ==, ===, eql?, equal。
Explain each of the following operators==,===,eql?,equal?
24
nil?, empty? 和, blank? present? 比較?
What’s the difference betweennil?,empty?,blank?andpresent??
25
.present? 和.exists? 比較?
What is the difference between.present?and.exists?
26
說明Ruby的錯誤處理機制。 Explain
Error Handlingin Ruby.
27
如何設定Ruby的Hash預設值?
How to setdefault valuein hash?
28
Ruby的 ** 運算子是什麼?
What does** (double splat)operator do?
29
請解釋Ruby的tap method?
What istap methodin Ruby?
30
請解釋Ruby的鴨子型別(duck type)?
What isduck type?