El tercer argumento opcional, si es t, hace que la función devuelva nil en lugar de la señal de error si la búsqueda falla.
The optional third argument, if t, causes the function to return nil rather than signal an error if the search fails.
Cuando se invoca string.gsub con una función como su tercer argumento, siempre que esta función devuelva nil o false el string de reemplazamiento es la coincidencia completa en lugar de un string vacío.
When string.gsub is called with a function as its third argument, whenever this function returns nil or false the replacement string is the whole match, instead of the empty string.
Es posible que el comentario sea nulo, así que utilizaremos el método try de Rails para leer el atributo user de forma que se devuelva nil en lugar de elevar una excepción.
There's a possibility that the comment might be nil so we'll use Rails' try method to read the user attribute so that nil is returned if the comment is nil instead of an exception being raised.
Alte rezultate
Si no encuentra la clave, a continuación, devuelve nil.
Por consiguiente, la expresión re-search-forward devuelve nil.
Consequently, the re-search-forward expression returns nil.
Por otra parte, esta función devuelve nil si la prueba es falsa.
On the other hand, this function returns nil if the test is false.
Si ninguna de las pruebas prueba-verdadero-o-falso es verdadera, la expresión cond devuelve nil.
If none of the true-or-false-tests test true, the cond expression returns nil.
Devuelve nil si no lo encuentra.
Returns nil if no match is found.
Conținut posibil inadecvat
Exemplele au rolul de a te ajuta să traduci cuvinte sau expresii corect si adaptat la context. Nu sunt selectate sau validate manual, așadar pot conține termeni inadecvați. Te rugăm să raportezi exemplele pe care le consideri inadecvate. Traducerile vulgare sau colocviale sunt în general marcate cu roșu sau cu portocaliu.
Înregistrează-te pentru a accesa mai multe exemple