| unice | bye bye |
| Bounga | anyone knows how to retrieve a file in a svn repository using svn ruby bindings ? |
| teferi | ha, I do believe I've achieved success after two days of digging through the gnarliest bits of this app, all the tests pass again |
| iceman8 | mmmm is possible do this? -> array['#{variable}']['define'] = "hello" |
| teferi | uhhh no an array isn't a hash |
| iceman8 | sorry |
| kaydara | i have the mounth, whats the best way to get the final day of this mounth ? |
| iceman8 | i mistake is possible do this? -> hash['#{variable}']['define'] = "hello" |
| teferi | where variable is? |
| iceman8 | i get variable two line up but return this error undefined method `[]=' for nil:NilClass (NoMethodError) in this mode work is possible do this? -> hash['#{variable}' = "hello" is possible do this? -> hash['#{variable}'] = "hello"* |
| teferi | why wouldn't it be? you've got to create the hash first |
| Arsen7 | hash['#{variable}'] ||= {}; hash['#{variable}']['define'] = "hello" |
| iceman8 | yes done |
| teferi | if you want the default value of a hash key with no previous value to be a hash, you need to do a little work |
| iceman8 | mmm sorry sor my insolence but in php -> $hash[$variable]['define'] = "hello" |
| Arsen7 | or hash = Hash.new { |hash,key| hash[key] = {} } |
| iceman8 | and create an array sorry a hash |
| Arsen7 | and then you could call hash['#{variable}']['define'] = "hello" |
| teferi | what Arsen7 said iceman8: well, tjhis isn't PHP |
| iceman8 | ok |
| teferi | ruby asks that you say what you mean |
| iceman8 | eh |
| teferi | a hash is a collection of key-value pairs of objects. if you want it to automatically create values for you, you have to tell it how to do it |
| Arsen7 | iceman8: And, by the way - you know that '#{variable}' will NOT be expanded to the value of the variable? You should use double quotes if you twant this. |
| teferi | and it's also totally redundant |