[Ironruby-core] r105 broke assembly loading

Ivan Porto Carrero ivan at flanders.co.nz
Tue May 13 20:01:28 EDT 2008


maybe system.net was a bad example.

I also have a compiled dll that contains my objects.. when I run my  
specs with r104 things work
when I do it with r105 they don't anymore.  They always fail on those  
require lines.

and you're saying that now I don't have to go through a  
assemblies.each{|assembly| require assembly} anymore but can just do
ir -l bin lib/main.rb to get my app going ?

---

in the past I just had to do require path_to_my_own_assembly
It seems that that has changed now? At this moment it doesn't seem to  
recognize a .dll as an assembly but rather wants to execute is as a  
ruby source file. Where before the LoadModule method would call  
GetFileKind at some point and correctly identify .dll as an assembly.

---

I did some more investigating and it seems like File.dirname(__FILE__)  
doesn't report the correct directory in the console
+ C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby
» ir
IronRuby 1.0.0.0 on .NET 2.0.50727.1434
Copyright (c) Microsoft Corporation. All rights reserved.

Note that local variables do not work today in the console.
As a workaround, use globals instead (eg $x = 42 instead of x = 42).

 >>> File.dirname(__FILE__)
=> "C:\projects\lumpr\src\Sylvester.DesktopEdition"
 >>>

I thought it would to return => "C:\projects\lumpr\src 
\Sylvester.DesktopyEdition\Sylvester.IronRuby"


Thanks
Ivan

On 14/05/2008, at 10:42 AM, John Lam (IRONRUBY) wrote:

> One more thing, r105 adds support for the -I command line switch, so  
> you can now:
>
> ir -I path-to-your-includes-directory yourapp.rb
>
> Thanks,
> -John
>
>
> -----Original Message-----
> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org 
> ] On Behalf Of Ivan Porto Carrero
> Sent: Tuesday, May 13, 2008 3:32 PM
> To: ironruby-core at rubyforge.org
> Subject: [Ironruby-core] r105 broke assembly loading
>
> Hi
>
> I just updated to r105 and now I can't require assemblies anymore.
>
>>>> require 'bin/System.Net.dll'
> c:\tools\IronRuby\src\IronRuby.Libraries\Builtins\Kernel.cs:272:in
> `Require': Invalid character '?' in expression (Synta
> xError)
>         from :0:in `Initialize##1'
>
> Do I submit a bug for that?
>
> Cheers
> Ivan
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core



More information about the Ironruby-core mailing list