This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local _G = _G | |
module('Event') | |
local ERROR_FUN_NOT_FUNCTION = 'Wrong parameter type: must be a function' | |
local function is_function(fun) | |
if fun and _G.type(fun) == 'function' then | |
return true | |
else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hpricot 0.8.1 test suite executed against the 0.7_experimental | |
branch of ironruby-hpricot (updated to commit f98ec80) | |
----------------------------------------------------------------- | |
Loaded suite test_alter | |
Started | |
......... | |
Finished in 0.667969 seconds. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IronRuby 0.4.0.0 on .NET 2.0.50727.4918 | |
Copyright (c) Microsoft Corporation. All rights reserved. | |
>>> load_assembly "test" | |
=> true | |
>>> source = open("data.xml") | |
=> #<File:data.xml> | |
>>> Test::Nrk.read(source) | |
C:\Development\ironruby\working-nrk\ndp\fx\src\Core\Microsoft\Scripting\Actions\DynamicMetaObjectBinder.cs:87:in `Bind': The result type 'System.Object' of the binder 'read(C,0)' is not compatible with the result type 'IronRuby.Builtins.MutableString' expected by the call site. (TypeError) | |
from C:\Development\ironruby\working-nrk\ndp\fx\src\Core\Microsoft\Scripting\Actions\C |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'redis' | |
local redis = Redis.connect("127.0.0.1", 6379) | |
redis:ping() -- true | |
redis:increment_by("my_key", 10) -- 10 | |
redis:increment_by("my_key", 10) -- 20 | |
redis:exists("my_key") -- true | |
redis:exists("another_key") -- false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[MissingMethodException: undefined method `create_user' for #<AccountMembershipService:0x0000298 @repo=IrTodo.Models.Lightspeed.IrTodoRepository>] | |
IronRuby.Builtins.KernelOps.MethodMissing(RubyContext context, Object self, SymbolId symbol, Object[] args) in c:\tools\ironruby\merlin\main\Languages\Ruby\Libraries.LCA_RESTRICTED\Builtins\KernelOps.cs:460 | |
CallSite.Target(Closure , CallSite , RubyScope , Object , Object , Object , Object ) +232 | |
System.Dynamic.UpdateDelegates.UpdateAndExecute5(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4) in c:\tools\ironruby\ndp\fx\src\core\microsoft\scripting\Actions\UpdateDelegates.Generated.cs:759 | |
ℑℜ;register;account_controller.rb;46;550$421.ℑℜ;register;account_controller.rb;46;550(Object #self, Proc #block) in C:\projects\irtodo.koolkraft.net\Controllers\account_controller.rb:60 | |
CallSite.Target(Closure , CallSite , Object ) +144 | |
System.Dynamic.UpdateDelegates.UpdateAndExecute1(CallSite site, T0 arg0) in c:\tools\ironruby\ndp\fx\src\core\microsof |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See http://en.wikipedia.org/wiki/Bencode for reference | |
# encoding objects | |
Number asBencode := method( | |
Sequence with("i", self asString, "e") | |
) | |
Sequence asBencode := method( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'win32/process' | |
process_info = Process.create( | |
:app_name => "notepad.exe", | |
:creation_flags => Process::DETACHED_PROCESS, | |
:process_inherit => false | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- defining you application in the global scope | |
require 'sinatra' | |
module('nrk', package.seeall, sinatra.application) | |
get("/", function() | |
return "<h1>Welcome to " .. APP_NAME .. "!</h1>" | |
--[[ | |
URL: http://127.0.0.1/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\Development\ironruby\working-nrk\Merlin\Main\bin\Debug>ir -v | |
IronRuby 0.9.0.0 on .NET 2.0.0.0 | |
C:\Development\ironruby\working-nrk\Merlin\Main\bin\Debug>ir termtter\run_termtter.rb | |
your twitter user name: JoL1hAHN | |
your twitter password: | |
generated: ~/.termtter/config | |
enjoy! | |
←[31m[ERROR] ArgumentError: wrong number of arguments (2 for 1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
Short code snippet that shows how to launch Mercury's greetings sample using Xavante. | |
Mercury: http://github.com/nrk/mercury/ | |
Xavante: http://www.keplerproject.org/xavante/ | |
]] | |
require 'luarocks.require' | |
require 'xavante' | |
require 'wsapi.xavante' |