- 论坛徽章:
- 30
|
- C:\rb>cat t.rb
- pr=Proc.new { p "Proc object" }
- pr.call
- def test_proc(&sample)
- sample.call
- end
- test_proc { p "another sample" }
- C:\rb>ruby t.rb
- "Proc object"
- "another sample"
- C:\Users\lyuan\Desktop\rb>gem list
- *** LOCAL GEMS ***
- archive-tar-minitar (0.5.2)
- atk (2.0.0 x86-mingw32)
- bigdecimal (1.1.0)
- builder (3.2.0)
- cairo (1.12.6 x86-mingw32)
- chef (11.4.4)
- childprocess (0.3.9)
- ffi (1.8.1 x86-mingw32)
- gdk_pixbuf2 (2.0.0 x86-mingw32)
- glib2 (2.0.0 x86-mingw32)
- gtk2 (2.0.0 x86-mingw32)
- highline (1.6.19)
- io-console (0.3)
- ipaddress (0.8.0)
- json (1.5.4)
- mime-types (1.23)
- minitest (2.5.1)
- mixlib-authentication (1.3.0)
- mixlib-cli (1.3.0)
- mixlib-config (1.1.2)
- mixlib-log (1.6.0)
- mixlib-shellout (1.1.0 x86-mingw32)
- net-scp (1.1.1, 1.0.4)
- net-ssh (2.6.7, 2.2.2)
- net-ssh-gateway (1.2.0)
- net-ssh-multi (1.1)
- nokogiri (1.5.9 x86-mingw32)
- ocra (1.3.1)
- ohai (6.16.0)
- pango (2.0.0 x86-mingw32)
- pkg-config (1.1.4)
- rake (0.9.2.2)
- rdoc (3.9.4)
- rest-client (1.6.7)
- systemu (2.5.2)
- vagrant (1.0.7)
- win32-api (1.4.8 x86-mingw32)
- win32-process (0.6.6)
- windows-api (0.4.2)
- windows-pr (1.2.2)
- yajl-ruby (1.1.0 x86-mingw32)
- C:\Users\lyuan\Desktop\rb>orca t.rb
- 'orca' is not recognized as an internal or external command,
- operable program or batch file.
- C:\rb>ocra t.rb
- === Loading script to check dependencies
- "Proc object"
- "another sample"
- === Including 52 encoding support files (2831360 bytes, use --no-enc to exclude)
- === Building t.exe
- === Adding user-supplied source files
- === Adding ruby executable ruby.exe
- === Adding detected DLL C:/Ruby193/bin/libyaml-0-2.dll
- === Adding detected DLL C:/Ruby193/bin/zlib1.dll
- === Adding detected DLL C:/Ruby193/bin/libffi-6.dll
- === Adding library files
- === Compressing 6737196 bytes
- === Finished building t.exe (1603548 bytes)
- C:rb>t
- "Proc object"
- "another sample"
- C:\rb>
复制代码 |
|