#ruby-lang - Fri 30 Mar 2007 between 12:51 and 13:13



unicebye bye
Boungaanyone knows how to retrieve a file in a svn repository using svn ruby bindings ?
teferiha, I do believe I've achieved success
after two days of digging through the gnarliest bits of this app, all the tests pass again
iceman8mmmm
is possible do this? -> array['#{variable}']['define'] = "hello"
teferiuhhh
no
an array isn't a hash
iceman8sorry
kaydarai have the mounth, whats the best way to get the final day of this mounth ?
iceman8i mistake
is possible do this? -> hash['#{variable}']['define'] = "hello"
teferiwhere variable is?
iceman8i 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"*
teferiwhy wouldn't it be?
you've got to create the hash first
Arsen7hash['#{variable}'] ||= {}; hash['#{variable}']['define'] = "hello"
iceman8yes
done
teferiif you want the default value of a hash key with no previous value to be a hash, you need to do a little work
iceman8mmm
sorry sor my insolence but in php -> $hash[$variable]['define'] = "hello"
Arsen7or hash = Hash.new { |hash,key| hash[key] = {} }
iceman8and create an array
sorry a hash
Arsen7and then you could call hash['#{variable}']['define'] = "hello"
teferiwhat Arsen7 said
iceman8: well, tjhis isn't PHP
iceman8ok
teferiruby asks that you say what you mean
iceman8eh
teferia 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
Arsen7iceman8: 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.
teferiand it's also totally redundant

Page: 3 10 17 24 31 38 45 52 

IrcArchive