Ruby has two forms of multiple-selection constructs, both of which are called case expressions and both of which yield the value of the last expression evaluated.

what both refers to?

  • 1
    "Both" refers to the "two forms of multiple-selection constructs". – starsplusplus Jan 22 '14 at 13:07

Consider the following sentences:

  1. Raj has two balls, both of which are red.

  2. Raj has two balls of equal size, both of which are red in colour.

There are two balls about which the sentence after comma describes.

So "both" in your sentence describes about the 'two forms'.

Here 'both' is used as a pronoun which refers two things together. In this case the two forms. And both always mentions two things and not multiple things or so.

  • so with your answer you say that; it means that one of two forms is called case exp. and other form is that yield the value of the last exp. evaluated or each of forms are called case exp. and will yield the value of the last exp. evaluated ? – Majid Jan 22 '14 at 11:21
  • 1
    No pal. Both the forms are called CaseExpressions and they both yield the value of the last expression evaluated it seems. I don't know about ruby. Just check with some examples in ruby. – VijayaRagavan Jan 22 '14 at 11:24
  • Check my edited answer. – VijayaRagavan Jan 22 '14 at 11:28

Both is an indefinite pronoun replacing in Ruby’s case the noun: “form of multiple-selection constructs” and in Raj’s case the noun: “ball”. Both is the dual (plural) form of an indefinite pronoun.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.