irpack 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -78,7 +78,7 @@ module IRPack
78
78
  public override Assembly LoadAssembly(string name)
79
79
  {
80
80
  foreach (var asm in AppDomain.CurrentDomain.GetAssemblies()) {
81
- if (asm.FullName==name) {
81
+ if (asm.FullName==name || asm.GetName().Name==name) {
82
82
  return asm;
83
83
  }
84
84
  }
@@ -95,5 +95,25 @@ class TC_IRPack_EntryPoint < Test::Unit::TestCase
95
95
  assert_equal(-1, res)
96
96
  end
97
97
  end
98
+
99
+ def test_load_assembly
100
+ output_file = tempfilename('.dll')
101
+ module_name = 'TestModule'
102
+ entry_file = 'main.rb'
103
+ references = ironruby_assemblies
104
+
105
+ IRPack::EntryPoint.compile(output_file, module_name, entry_file, references)
106
+ asm = System::Reflection::Assembly.load_from(output_file)
107
+ main = asm.get_type("#{module_name}.EntryPoint").get_method('Main')
108
+ assert_not_nil(main)
109
+ main_rb = <<-RB
110
+ load_assembly 'IronRuby.Libraries', 'IronRuby.StandardLibrary.StringIO'
111
+ RB
112
+ create_package('main.rb' => main_rb) do |package|
113
+ assert_nothing_raised do
114
+ main.invoke(nil, System::Array[System::Object].new([package, System::Array[System::String].new(0)]))
115
+ end
116
+ end
117
+ end
98
118
  end
99
119
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: irpack
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.2
5
+ version: 0.2.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - kumaryu
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-07-16 00:00:00 Z
13
+ date: 2011-08-04 00:00:00 Z
14
14
  dependencies: []
15
15
 
16
16
  description: |