MacRuby
Register
Lost Password
Login
Projects
Apple Lossless Audio Codec
BridgeSupport
Calendar and Contacts Server
DCERPC
Darwin Streaming Server
DarwinBuild
FS Tools
MacPorts
MacRuby
SmartCard Services
WebKit
XQuartz
launchd
libdispatch
Wiki
New Ticket
View Tickets
Browse Source
Search:
Context Navigation
Back to Ticket #664
Ticket #664
: test.rb
File test.rb,
188 bytes
(added by dylan@…,
2 years
ago)
simple test case
Line
1
def
main_thread
(
&
block
)
2
block
.
performSelectorOnMainThread
(
'call'
,
withObject
:
nil
,
waitUntilDone
:
true
)
3
end
4
5
Thread
.
new
do
6
main_thread
do
7
[
1
,
2
,
3
].
each
{
|
i
|
puts
i
}
8
end
9
end
Download in other formats:
Original Format