Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
epochwolf
15y ago
0 comments
Save
Share
You can call a proc with []
p = Proc.new {|str| puts "Hello #{str}" } p["World"] # prints "Hello World"
:)
0 comments
1 comments · 1 top-level
top
newest
oldest
mcantor
15y ago
I'm aware of this, but it's still not (). You still must be aware that you are dealing with an unbound proc object, and it must be handled differently than usual!
j
/
k
navigate · click thread line to collapse