Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I am not a Ruby programmer. What's the syntax for using a variable as the key, which is actually synonymous with the Python code?


It would be something like this:

    >> a = :foobar
    => :foobar
    >> {a => 1}
    => {:foobar=>1}




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: