Function object
In Ruby, several objects can be considered function objects, in particular Method and Proc objects. Ruby also has two kinds of objects that can be thought of as semi-function objects: UnboundMethod and block. UnboundMethods must first be bound to an object (thus becoming a Method) before they can be used as a function object. Blocks can be called like function objects, but to be used in any other capacity as an object (e.g. passed as an argument) they must first be converted to a Proc. More recently, symbols (accessed via the literal unary indicator codice_35) can also be converted to codice_36s. Using Ruby's unary codice_37 operator—equivalent to calling codice_38 on an object, and assuming that method exists—the Ruby Extensions Project created a simple hack.
Object (computer science)
Rather than structure programs as code and data, an object-oriented system integrates the two using the concept of an "object". An object has state (data) and behavior (code). Objects can correspond to things found in the real world. So for example, a graphics program will have objects such as "circle", "square", "menu". An online shopping system will have objects such as "shopping cart, customer, product". The shopping system will support behaviors such as "place order", "make payment", and "offer discount". The objects are designed as class hierarchies. So for example with the shopping system there might be high level classes such as "electronics product", "kitchen product", and "book". There may be further refinements for example under "electronic products": "CD Player, DVD player", etc. These classes and subclasses correspond to sets and subsets in mathematical logic.