THE UNSTOPPABLE POWER OF RUBY
1
Name:
Anonymous
2009-10-03 4:24
Watch and learn , you low-life punks:
!/usr/bin/ruby
class Shell
def self.method_missing(name,*args)
cmd = name.to_s;
args.each { |a| cmd += " " + a }
output = `#{cmd}`.split("\n")
return output
end
end
puts Shell.ls("-al");
puts
puts Shell.uname("-a");
2
Name:
Anonymous
2009-10-03 4:24
fail. GTFO
3
Name:
Anonymous
2009-10-03 4:24
in before missing # in shebang
4
Name:
Anonymous
2009-10-03 4:41
Why didn't you make them kernel methods so that you don't have to spend all that time typing "Shell" to invoke them? You are a poor programmer.
5
Name:
Anonymous
2009-10-03 4:48
[quote] return output
end[/quote]
-10 style points
GTFO
6
Name:
Anonymous
2009-10-03 4:49
>>5
fuckkkkkkkk i fucked it up realllll good didn't i
7
Name:
Anonymous
2009-10-03 5:02
>>5
Oh because I didnt make use of the implicit return?
8
Name:
Anonymous
2009-10-03 5:07
fixed
class Shell
def self.method_missing(name,*args)
`#{name.to_s + " " + args.join(" ")}`.split("\n")
end
end
9
Name:
Anonymous
2009-10-03 5:31
Where is that Amazing Anus fellow? I enjoyed his banter.
11
Name:
Anonymous
2009-10-03 7:16
Nice party trick , David . I wish I could go back in time and prevent you from making it the core architecture pattern of web 2.0.
12
Name:
Anonymous
2009-10-03 19:02
>>11
This was
pure ruby, not rails.
I am thinking about writing something codenamed
Trolling on Rails to aid in crapflooding or meme-insertion etc etc
13
Name:
Anonymous
2009-10-03 19:27
def Object.const_missing(name)
if (not Object.constants.include?(name.capitalize.to_sym))
m = Module.new do
def self.method_missing(name, &block)
self.class.send(:define_method, name, &block)
true
end
end
Object.const_set(name.capitalize, m)
end
end
Party.trick {|x, y| puts x+y}
Party.trick 2,3
14
Name:
Anonymous
2009-10-03 19:56
>>12
etc etc
Back to /./, please.
15
Name:
Anonymous
2009-10-03 20:26
Fjölnir on Fjords has superseded RoR as the state-of-the-art in Web technology.
16
Name:
Anonymous
2009-10-03 20:52
17
Name:
Anonymous
2009-10-04 0:46
>>16
in Norwegian, grunner means 'reasons'
18
Name:
Anonymous
2009-10-04 0:48
これは、NULLは無効です。
19
Name:
Anonymous
2009-10-04 0:54
20
Name:
Anonymous
2009-10-04 1:24
http://code.google.com/p/mjollnir/
Future goals:
Better runtime error messages (stack traces etc.)
Support more of
"GRUNNUR" and other libraries
21
Name:
Anonymous
2009-10-04 1:34
22
Name:
Anonymous
2009-10-04 1:44
>>21
Actually, in Iceland, it goes DD/MM/YY, not MM/DD/YY, so that means it was updated 17-5th-2009 in the U.S. date format.
23
Name:
Anonymous
2009-10-04 5:10
24
Name:
Anonymous
2009-10-04 5:11
>>22
What the hell are you talking about?! You're crazy!
25
Name:
Anonymous
2009-10-04 10:55
"GRUNNUR". IHBT .
26
Name:
GJSussman
!xpQSO2ECEY
2009-10-16 14:51
27
Name:
Anonymous
2010-11-15 11:16