Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Wroclove.rb - JRuby vs. Rubinius
Search
Dirkjan Bussink
March 14, 2012
Technology
1
120
Wroclove.rb - JRuby vs. Rubinius
Fighting for the Rubinius side
Dirkjan Bussink
March 14, 2012
Tweet
Share
More Decks by Dirkjan Bussink
See All by Dirkjan Bussink
Managing a widely distributed team
dbussink
1
190
Time
dbussink
0
110
The tricky truth about parallel execution and modern hardware
dbussink
0
340
The future of Ruby is faster
dbussink
3
540
Security for dummies
dbussink
1
160
The myth of dynamic language performance
dbussink
3
450
Rubinius - Tales from the trenches @ Railsclub.ru 2012
dbussink
2
210
Rubinius - Tales from the trenches @ Baruco 2012
dbussink
1
260
Rubinius Eurucamp 2012 Workshop
dbussink
2
120
Other Decks in Technology
See All in Technology
20251007: What happens when multi-agent systems become larger? (CyberAgent, Inc)
ornew
1
300
GoでもGUIアプリを作りたい!
kworkdev
PRO
0
150
ニッポンの人に知ってもらいたいGISスポット
sakaik
0
150
スタートアップにおけるこれからの「データ整備」
shomaekawa
2
480
Wasmのエコシステムを使った ツール作成方法
askua
0
190
Introduction to Bill One Development Engineer
sansan33
PRO
0
300
能登半島地震において デジタルができたこと・できなかったこと
ditccsugii
0
220
AgentCon Accra: Ctrl + Alt + Assist: AI Agents Edition
bethany
0
110
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
930
AWS Top Engineer、浮いてませんか? / As an AWS Top Engineer, Are You Out of Place?
yuj1osm
2
220
Geospatialの世界最前線を探る [2025年版]
dayjournal
1
220
能登半島地震で見えた災害対応の課題と組織変革の重要性
ditccsugii
0
980
Featured
See All Featured
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
61k
Documentation Writing (for coders)
carmenintech
75
5.1k
Become a Pro
speakerdeck
PRO
29
5.6k
Fireside Chat
paigeccino
40
3.7k
A designer walks into a library…
pauljervisheath
209
24k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.7k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Facilitating Awesome Meetings
lara
56
6.6k
How to Ace a Technical Interview
jacobian
280
24k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.7k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.5k
The Cost Of JavaScript in 2023
addyosmani
55
9k
Transcript
Dirkjan Bussink http://github.com/dbussink @dbussink
None
None
REMOVED
@JRubyMethod(name = {"collect", "map"}, compat = CompatVersion.RUBY1_8) public static IRubyObject
collect(ThreadContext context, IRubyObject self, final Block block) { final Ruby runtime = context.getRuntime(); final RubyArray result = runtime.newArray(); if (block.isGiven()) { callEach(runtime, context, self, block.arity(), new BlockCallback() { public IRubyObject call(ThreadContext ctx, IRubyObject[] largs, Block blk) { IRubyObject larg = checkArgs(runtime, largs); IRubyObject value = block.yield(ctx, larg); synchronized (result) { result.append(value); } return runtime.getNil(); } }); } else { callEach(runtime, context, self, Arity.ONE_ARGUMENT, new AppendBlockCallback(runtime, result)); } return result; }
def collect if block_given? ary = [] each do |*o|
ary << yield(*o) end ary else to_enum :collect end end
None
> (x . xs) = [1, 2, 3] [1, 2,
3] > x 1 > xs [2, 3]
1 patch == commit access