News for hackers. Stuff that matters.
Re:Ruby 2.1 Released by UNIXgod on Wednesday December 25, 2013 @08:38PM (#6964958)
2.1.0p0 :001 > x = def foo() puts "hello"; end

=> :foo

2.1.0p0 :002 > def eval_it_now_bitch! lulz

2.1.0p0 :003?> eval lulz.to_s

2.1.0p0 :004?> end

=> :eval_it_now_bitch!

2.1.0p0 :005 > eval_it_now_bitch! x

hello

=> nil

Re:Ruby 2.1 Released by UNIXgod on Thursday December 26, 2013 @02:06AM (#6965498)
I actually thought that the new feature of def yielding the symbolic name of the newly defined function was interesting, if for anything to open up new areas where there was a limit before on building lookup tables for macro and meta programming techniques with either DSL creation and|or basic ruby hacking for fun.