Fonte: Programming Ruby – The Pragmatic Programmers’ Guide

Operadores em Ruby (da maior para a menor prioridade)

Método

Operador

Descrição (em inglês)

Sim

[ ] [ ]=

Element reference, element set

Sim

**

Exponentiation (raise to the power)

Sim

! ~ + -

Not, complement, unary plus and minus (method names for the last two are +@ and -@)

Sim

* / %

Multiply, divide, and modulo

Sim

+ -

Addition and subtraction

Sim

>> <<

Right and left bitwise shift

Sim

&

Bitwise `AND’

Sim

^ |

Bitwise exclusive `OR’ and regular `OR’

Sim

<= < > >=

Comparison operators

Sim

<=> == === != =~ !~

Equality and pattern match operators (!= and !~ may not be defined as methods)

Não

&&

Logical `AND’

Não

||

Logical `AND’

Não

.. …

Range (inclusive and exclusive)

Não

? :

Ternary if-then-else

Não

= %= { /= -= += |= &= >>= <<= *= &&= ||= **=

Assignment

Não

defined?

Check if specified symbol defined

Não

not

Logical negation

Não

or and

Logical composition

Não

if unless while until

Expression modifiers

Não

begin/end

Block expression

Operadores com um Sim na coluna “Método” são realmente métodos e por isso podem ser sobrecarregados.

 

Ao utilizarmos um Windows de 64 bits, as fontes de dados ODBC disponíveis utilizam os drivers de 64 bits por padrão. Para criar conexões utilizando os drivers de 32 bits rodar o comando “odbcad32″, que geralmente se encontra em “c:\windows\syswow64\odbcad32.exe”

© 2012 blog do fred Suffusion theme by Sayontan Sinha