Release Name: 0.6.0
Notes:
The IronRuby team is pleased to announce a new release of IronRuby: IronRuby 0.6!
== Download IronRuby 0.6
http://ironruby.net/Download
You can also check out the source code for this release
http://github.com/ironruby/ironruby/tree/v0.6.0
For a nicely formatted version of these release notes:
Staying true to our "Conference-driven development
schedule," this release is in conjunction with ... wait,
there is no conference this time! Just a good ol' monthly
release of IronRuby, chock full of awesomeness. And just so
happens to be the 4th of July, so hopefully you have some
downtime this weekend and can give the new release a spin.
== What's in the Release?
Performance has been a major focus to this release, getting
startup time quicker and optimizing built-in types. And
there's been more progress with Ruby compatibility
(Cucumber works!) and .NET interop. Silverlight binaries are
back in the release, and there are a couple of samples to
help you learn IronRuby.
Most of these descriptions are from Tomas's very detailed
code review emails, so thanks Tomas! For more detailed
information, please see the CHANGELOG (which includes all
commit messages for the release ... not just "syncing to
head of tfs")
-- Lazy method compilation
Last release adaptive compilation was enabled for IronRuby,
which uses a fast-to-start-up interpreter to start up the
program, while code which gets run a lot is compiling on a
background thread. This gave IronRuby significant
performance improvements for large apps like Rails, which
has improved startup by 2.5 times.
This release we've added "lazy method transformation" to the
bag of startup performance tricks. In IronRuby 0.5, a method
was transformed to the DLR AST as soon as it was defined.
IronRuby 0.6 postpones the transformation until the first
time the method is called. This significantly improves
startup time. For example (not NGEN'd):
require 'benchmark'
Benchmark.bm { |x| x.report { require 'rubygems' } }
user system total real
eager transformation
1.622410 0.031200 1.653611 ( 1.581316)
lazy transformation
1.170008 0.031200 1.201208 ( 1.099220)
This has made Rails startup time 30% faster, coming in
approximately 20 seconds on my dual-core laptop running
Windows 7.
-- CLR member enumeration
Now methods like Module#instance_methods, etc, include CLR
member names. Though it's a lot cooler than that. The array
of methods returns contains strings for Ruby methods, and
objects of type IronRuby::Clr::Name to represent CLR methods
that can be called by either the actual CLR name or a
mangled (Ruby-esk) name. ClrName has methods to_s, to_sym,
to_str, <=>, inspect, dump so that it can be used wherever a
string can be used. The display string for the name uses
single quotes so that you can easily distinguish CLR (dual)
names from regular names (plain mutable strings). CLR
strings display themselves as single quoted strings, so this
fits nicely.
>>> System::Byte.instance_methods(false)
=> ["-", "%", "&", "*", "**", "/", "-@", "[]", "^", "|", "~", "+", "<", "<<",
"<=", "<=>", "==", ">", ">=", ">>", "abs", "div", "divmod", "modulo",
"quo", "to_f", "to_s", "zero?", "size", 'compare_to', 'equals',
'get_hash_code', 'to_string', 'get_type_code']
>>> l = System::Byte.instance_methods(false).last
=> 'get_type_code'
>>> l.ruby_name
=> "get_type_code"
>>> l.clr_name
=> "GetTypeCode"
Even cooler, this works well for meta-programming:
class System::Decimal
instance_methods(false).each do |name|
mangled = '__' + name
alias_method(mangled, name)
private mangled
define_method(name) do |*args|
puts "method called: #{name}"
send mangled, *args
end
end
end
x, y = System::Decimal.new(1), System::Decimal.new(2)
p x + y # => "method called: +"
p x.CompareTo(y) # => "method called: compare_to"
A new set of define_method overloads, strongly typed to
ClrName, have been added to enable this. They define the
real method using the ruby_name and alias it using the
clr_name. So both CompareTo and compare_to calls are
intercepted.
-- Generic-Method Parameters-Inference
Thanks to some work by the IronPython team, IronRuby now has
parameter inference for generic methods.
// c.dll
public class C {
public void Foo<T>(T x) { Console.WriteLine(typeof(T)); }
}
require 'c'
C.new.foo(1) # System.Int32
C.new.foo("x") # IronRuby.Builtins.MutableString
C.new.foo(1.0) # System.Double
This needs some more TLC before it works perfectly, but this
lets you use simple LINQ methods from IronRuby.
load_assembly "System.Core"
#=> true
System::Linq::Enumerable.First([1,2,3])
#=> 1
System::Linq::Enumerable.ElementAt([1,2,3,4,5], 2)
#=> 3
-- Testing C# with Cucumber
This release of IronRuby runs the Cucumber testing framework
rather well. Try out Cucumber against some C# code here:
http://wiki.github.com/aslakhellesoy/cucumber/ironruby-and-net
Given a feature file (this being the addition.feature):
Feature: Addition
In order to avoid silly mistakes
As a math idiot
I want to be told the sum of two numbers
Scenario Outline: Add two numbers
Given I have entered <input_1> into the calculator
And I have entered <input_2> into the calculator
When I press add
Then the result should be <output> on the screen
Examples:
| input_1 | input_2 | output |
| 20 | 30 | 50 |
| 2 | 5 | 7 |
| 0 | 40 | 40 |
A step_definition file (calculator_steps.rb):
require 'spec/expectations'
require 'Calculator' # Calculator.dll
Before do
@calc = Demo::Calculator.new # A .NET class in Calculator.dll
end
Given "I have entered $n into the calculator" do |n|
@calc.push n.to_i
end
When /I press add/ do
@result = @calc.Add
end
Then /the result should be (.*) on the screen/ do |result|
@result.should == result.to_i
end
And a DLL:
using System;
using System.Collections.Generic;
namespace Demo {
public class Calculator {
private List<int>args = new List<int>();
public void Push(int n) {
args.Add(n);
}
public int Add() {
int result = 0;
foreach(int n in args) {
result += n;
}
return result;
}
}
}
Cucumber will test the addition feature:
3 scenarios (3 passed)
12 steps (12 passed)
0m0.753s
-- Silverlight building and updated binaries
This release re-adds Silverlight binaries to IronRuby,
contained in the "silverlight" directory of the release.
These bits have been integrated from the AgDLR project
(http://github.com/jschementi/agdlr), and will be maintained
in the IronRuby and IronPython source code repositories from
now on. The AgDLR GitHub project will redirect to one of
those for binaries for both languages in Silverlight. In
addition, the SDLSDK (http://sdlsdk.codeplex.com) site will
be redirecting to the IronRuby and IronPython CodePlex
sites, for downloads, discussion, and issue tracking. AgDLR
was a little side project to add new features to DLR
Silverlight applications, and play around with Git. I'm very
happy to see it merged back in with the languages.
See the integration commit for more information:
http://github.com/ironruby/ironruby/commit/33211840f7482ffaa4970a6e630725fad2a70f5d
Another notable change is that you can now build Silverlight
binaries out of IronRuby's GitHub repository very easily.
Given that you have Silverlight installed at
"C:\Program Files\Microsoft Silverlight\2.0.40115.0", this
will build IronRuby for Silverlight:
msbuild Merlin/Main/Languages/Ruby/Ruby.sln
/p:Configuration="Silverlight Release"
/p:SilverlightPath="C:\Program Files\Microsoft Silverlight\2.0.40115.0"
You can also build IronPython for Silverlight in a similar
manner. Aliases for this will be added soon, but if you need
a custom build of the DLR languages for Silverlight, this is
the way to do it.
-- Samples
Six samples are included in this release. The first three
are desktop samples in the “/samples” directory. The last
three are Silverlight samples in the “/silverlight/samples”
directory:
1. Tutorial - An interactive IronRuby tutorial. Read more abou it here:
http://blog.jimmy.schementi.com/2009/06/ironruby-tutorial.html
2. DiskUse - A small WPF application which visualizes the disk usage for
a particular directory.
3. IRPowerShell - a small library and sample applications showing how to
interact with PowerShell from IronRuby.
4. Clock - a simple Silverlight sample
5. Photoviewer - do AJAX programming with IronRuby (ARAX =P)
6. REPL - Interactive console in the browser
-- Some more interesting changes:
- Improved DLR Interop: adds support for GetMember/SetMember with method_missing,
Binary/Unary operators, and indexers.
- Handling of CLR protected and private methods and properties
- Reimplemented File.expand_path such that it does not use System.IO.Path.
This allows us to get better compatibility with MRI. The motivating reason was
that RSpec does File.expand_path("filename:linenumber")
- Improves the implementation of singleton method dispatch.
These changes improve running time of specs significantly (2x)
- Renames Method, UnboundMethod#overloads (plural) to
Method, UnboundMethod#overload (singular).
The old name is still available for now and throws an exception.
- Implements adaptively compiled rules
- Improves performance of Array#- from quadratic algorithm to linear.
- Improves implementation of RubyArray
== Bugs closed
Here are all 37 bugs closed since the last release (2009-05-19). You can see
more information about each one here:
http://ironruby.codeplex.com/WorkItem/List.aspx
1521 Access is allowed to internal fields
1502 alias_method fails for :do
821 File.expand_path does not support a line number after filename
1509 Proc.to_s should include line number where the block was declared
1501 WinForms broken
1400 $? is not always Process::Status
1345 load_assembly(<partial_name>) should work
1344 System.Action.new does not work
1306 Cannot call CLR constructor of builtin type
1184 public(:foo) does not work correctly for mixed-in methods
1085 Cannot call new on subtypes of builtin classes whose "new" method has optional arguments
1060 visibility of send :define_method
917 Passing a Ruby array to a .NET method that expects an IEnumerable derivative fails with GetEnumerator call
783 Assert in SetMethodBasesNoLock when calling #== on Ruby class inheriting from CLR class which overrides Equals
761 Wrong behavior when calling redefined methods on object instances
1470 Can't call the BigIntegerOverload of a method with a DefaultProtocol Attribute on the BigInteger attribute
1426 The located assembly's manifest definition does not match the assembly reference. (ctp dev10 beta1)
1441 Error with cyrillyc text in Sharepoint
1352 Test Defects
814 Allocator underfined for <type> (TypeError)
572 Error when running Cucumber examples with IronRuby
718 IronRuby ignores RUBYLIB environment variable
727 to_proc not working
1351 redist-libs should have rubygems-1.3.1
466 ''.split(//, -1) returns [""] instead of []
940 Can't inherit from abstract classes
1028 Missing conversion from Duration to Fixnum (ActiveSupport)?
374 irails Foo: undefined method for OpenSLL::Random.random_bytes
459 throw FileNotFoundException => rescue Errno.NoEntryError
499 Pathname#cleanpath messes up the pathname
467 "igem install rails" fails
375 "ir script\server" causes a YAML parser error
461 Generic type conversion from Fixnum to Integer
674 autoload does not use File::SEPARATOR
1021 Time class instance
578 yield fails in eval'd code
605 Array#hash should properly handle recursive arrays
== Enjoy!
Please test out IronRuby 0.6 and let us know if you have any
issues. We hope you enjoy this release!
-- The IronRuby team
Changes:
30-6 (sborde)
Added Hosting tutorial
Conditional execution of a task with :run_unless, typically to ensure
prerequite commands are executed
26-06 (jdeville)
Regression tests to close Codeplex bugs:
Access is allowed to internal fields
from <http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1521>
File.expand_path does not support a line number after filename
from <http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=821>
alias_method fails for :do
from <http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1502>
Proc.to_s should include line number where the block was declared
from <http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1509>
WinForms broken
from <http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1501>
$? is not always Process::Status
from <http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1400>
load_assembly(<partial_name>) should work
from <http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1345>
System.Action.new does not work
from <http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1344>
Cannot call CLR constructor of builtin type
from <http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1306>
public(:foo) does not work correctly for mixed-in methods
from <http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1184>
Cannot call new on subtypes of builtin classes whose "new" method has
optional arguments
from <http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1085>
visibility of send :define_method
from <http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1060>
Passing a Ruby array to a .NET method that expects an IEnumerable
derivative fails with GetEnumerator call
from <http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=917>
Assert in SetMethodBasesNoLock when calling #== on Ruby class inheriting
from CLR class which overrides Equals
from <http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=783>
Wrong behavior when calling redefined methods on object instances
from <http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=761>
Can't call the BigIntegerOverload of a method with a DefaultProtocol Attrib
25-06 (tomat)
Replaces custom block delegates with Func delegates.
24-06 (tomat)
Implements FileTest and fixes race condition in a Rake test.
23-06 (tomat)
Improves implementation of RubyArray.
22-06 (jimmysch)
Fix ironruby_tutorial.rb where "require 'wpf.rb'" wasn't seen as a success
on the first attempt. The first execution results in "true" while the next
results in "false", and one attempt executed the code twice. The fix is a
bit hacky, but will suit unless we can handle detecting "require" better.
22-06 (tomat)
Disables adaptive compilation of Ruby sites in -X:NoAdaptiveCompilation is
set.
22-06 (jimmysch)
IronRuby Tutorial polish:
- Starting a tutorial jumps directly to the first task, but shows section
and chapter introductions above it (if they exist).
- FrameworkElement#set_or_collapse didn't show the element
- select_tree_view_item should only be used if the TreeView was
constructed with code
- "Move to next chapter" button is auto-focused
- Always scroll to the bottom on any repl activity
- Increase default window size to 640x700
- Header now has a bottom shadow instead of a border, to make scrolling
text look cleaner.
- Section/Chapter navigation now fills vertical space, and is a 100px wider.
- No more tutorial introduction animation; it always shows on the first page.
20-06 (tomat)
Fixes implementation of Kernel#eql?, Kernel#==, Kernel#hash, Array#eql? and
Array#hash and improves CLR interop.
Improves performance of Array#- from quadratic algorithm to linear.
CLR interop:
“hash” is mapped to “GetHashCode” and following below rules:
1) A Ruby call to Kernel#hash on a CLR object that overrides GetHashCode
will call that override.
2) A Ruby call to Kernel#hash on a Ruby subclass of a CLR type will call
the GetHashCode of the CLR type if the Ruby subclass doesn’t implement
“hash” method.
3) A Ruby data structure (like Array) that calculates its hash code based
on hash codes of its items dynamically calls “hash” on those items.
4) Any call from C# to GetHashCode on an instance of any Ruby class will
dynamically dispatch to either “hash”, “GetHashCode” or “get_hash_code”
whichever is found first in standard method resolution order. If multiple
of these methods are defined in the same class “hash” has highest priority
and “get_hash_code” the lowest. This implies that a Ruby method definition
with name “hash”, “GetHashCode” or “get_hash_code” in any Ruby class
overrides GetHashCode of the parent CLR class.
Similarly is “eql?” mapped to “Equals”.
Kernel#== is an alias for “eql?” and hence has the same behavior when invoked.
However, 4) doesn’t hold for “==”, i.e. method == defined in a Ruby class does
NOT override CLR Equals method.
Adds /noadaptive option to unit test driver.
Fixes removal of CLR methods.
Simplifies implementation of IsRemovable on RubyMemberInfo using IsRubyMethod.
IsRubyMethod returns true on all members that were defined by Ruby means, be
it explicit method definition (def keyword), alias, alias_method, define_method,
public/private/protected, overload, of, etc. CLR members used for definition of
a new method (via define_method, alias etc.) are called “detached” (as opposed
to “attached” CLR members, which represent the original CLR members). They
behave like any Ruby method with respect to method removal.
19-06 (sborde)
Alt-Enter fix for tutorial
Add support for multi-line input
18-06 (tomat)
DLR: Fixes bugs and implements new features in interpreter.
- Static field assignment.
- LessThan
- ConvertUnary – should re-box numeric values.
- Force compilation whenever ref/out parameters are encountered.
- Invocation expression with delegate target.
- Unbox – no-op.
- TypeEqual and TypeIs for sealed types.
Ruby:
- Implements adaptively compiled rules:
- RubyMetaBinder (subclass of all Ruby binders) implements BindDelegate so that:
o It creates AST for the rule calling Bind and wraps the result into a lambda
exactly like call site binder does.
o If this lambda is interpretable (doesn’t contain loops or other constructs
that force compilation) it creates an InterpretedDispatcher that hooks the
lambda’s “Compiled” event so that it gets called back as soon as compiled
delegate is available. Until that happens it dispatches rule invocations
to the interpreter.
o If the lambda is forced-compiled it uses the resulting delegate right away.
o The dispatcher is a generic class generated for Func and Action delegates
with 0..15 generic parameters.
- Also Adds specs for “include?” used on ClrNames.
Adds missing type test to singleton rules.
17-06 (sborde)
Adds WPF content to ironruby_tutorial
Improves the testing
17-06 (dinov)
Ruby’s MethodGroupInfo was doing MakeGenericMethod and then returning the
generic method.But the types it’s passing in are all generic parameters –
so the end result is Ruby produces a method for which
.IsGenericMethodDefinition is false but it contains all of the original
generic method parameters. Now we return the original target so
IsGenericMethodDefinition remains true. Also updated MissingBlockArgBuilder
so we can know that it doesn’t really prodive any parameters. Finally the
small set of tests verifying exceptions are throw are updated to expect
successful inference.
16-06 (sborde)
Fix non-deterministic Rake test for "multitask" by adding
semaphore.synchronize around array access
Changed default.mspec so that :core properly excludes the thread tests
Abstracts RubyUtils.FileSystemUsesDriveLetters
File.expand_path("c:/a..") should return "c:/a"
Fix Ruby snippet in DlrInteropTests.cs
Change system_spec to redirect output of a child process so that it does not
clutter the output
16-06 (jdeville)
adds a root directory rake file so rake commands can be run anywhere in the
git repo
removed old test tasks. All tests should be run via new tasks that will be
coming in, or via the mspec command line now
rewrite irtest.bat to use Ruby instead of Batch
making changes suggested by Ivan to allow compilation on Mono to work again.
refactor irtests into a ruby script
hook up test tasks, change default to run tests, make git:commit run tests,
namespace compilation, fix IronRuby.Test.exe
Most of IronPython now compiles with rake compile. We are only missing
IronPythonTest.dll, which may be ok
Adding more interop tests for delegate creation and invocation. Also adds
IronPython compilation to rake git:commit
Make legacy tests work from rake
split apps into two component tasks for granularity
add test to ensure that basic IronRuby works without ir.exe.config
move the no-config tests to mspec under interop\cli, -X tests will go here
eventually
code review fixes from Shri
more .net interop tests to get rid of test_basic
get rid of test_basic.rb
16-06 (jimmysch)
Auto-hide chapter/section navigation
Main screen with list of tutorials
Use test/spec
Totally change around wpf_tutorial.rb -- not perfect yet but it's a start
Move general wpf helpers into wpf.rb
Fix repl history margin
Fix reloading
16-06 (tomat)
Renames Method, UnboundMethod#overloads (plural) to Method,
UnboundMethod#overload (singular).
The old name is still available for now and throws an exception.
Implements ClrName#==.
Groups CLR unit tests into regions.
13-06 (tomat)
Fixes bug in calls to base virtual methods.
12-06 (tomat)
Fixes bug in CLR method lookup failure caching.
Implements pre-compilation for rules of methods calls with a block targeting
Ruby methods.
11-06 (tomat)
Fixes bug http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1506:
-X:PrivateBinding does not enable referring to classes that have internal
visibility
11-06 (tomat)
Fixes http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1502:
alias_method fails for :do.
11-06 (tomat)
Implements CLR member enumeration: methods Module#instance_methods, etc.
now include CLR member names.
Adds IronRuby::Clr::Name class, which represents a pair of names of a CLR
method – the primary name is mangled (Ruby name) the alternative name
is the actual CLR name.
Reflection methods like Module#instance_methods return instances of ClrName
whenever a CLR member is encountered that could be called by both names.
ClrName has methods to_s, to_sym, to_str, <=>, inspect, dump so that it can
be used wherever a string can be used. The display string for the name uses
single quotes so that you can easily distinguish CLR (dual) names from
regular names (plain mutable strings).
>>> System::Byte.instance_methods(false)
=> ["-", "%", "&", "*", "**", "/", "-@", "[]", "^", "|", "~", "+", "<", "<<",
"<=", "<=>", "==", ">", ">=", ">>", "abs", "div", "divmod", "modulo",
"quo", "to_f", "to_s", "zero?", "size", 'compare_to', 'equals',
'get_hash_code', 'to_string'
, 'get_type_code']
>>> l = System::Byte.instance_methods(false).last
=> 'get_type_code'
>>> l.ruby_name
=> "get_type_code"
>>> l.clr_name
=> "GetTypeCode"
Now this works with meta-programming as well:
class System::Decimal
instance_methods(false).each do |name|
mangled = '__' + name
alias_method(mangled, name)
private mangled
define_method(name) do |*args|
puts "method called: #{name}"
send mangled, *args
end
end
end
x, y = System::Decimal.new(1), System::Decimal.new(2)
p x + y # => “method called: +”
p x.CompareTo(y) # => “method called: compare_to”
The trick here is in new set of define_method overloads strongly typed to
ClrName that define the real method using the ruby_name and alias it using
the clr_name. So both CompareTo and compare_to calls are intercepted.
We might add similar overloads to other methods to improve meta-programming
experience for CLR types when needed.
10-06 (tomat)
Improves the implementation of singleton method dispatch.
1) The previous singleton related shelveset made IRubyObject singleton methods
as fast to call as regular methods. Since singletons of Object are frequently
used in specs, in fact any top level method calls are dispatched to a Object
singleton, it makes sense to optimize singletons of Object as well. So far
we mapped Object to System::Object and Object.new produced an instance of
System::Object. Since such instances are pretty useless in .NET – they are
essentially empty objects that you can’t do anything with - it is not
necessary to preserve this exact mapping. We still map the Object class
to System::Object CLR type, but the underlying CLR type of Object instances
is RubyObject. In pure Ruby program the difference is not observable. On
the other hand C# programs will see the instances typed to RubyObject.
2) Fixes http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=761:
Wrong behavior when calling redefined methods on object instances. This
is actually fixed by 1) but the same issue applies on CLR singletons.
Let’s say we have a CLR class C. Once you create a singleton of any of its
instance all rules generated for method calls whose receiver is *any*
instance of C must check whether the receiver is a singleton object of C
or a regular instance of C. Previously we did this check only for calls to
singleton methods. This check is a pretty expensive weak dictionary lookup.
One way of optimizing this is to reduce the need of these checks. If we are
sure that no singleton method of the given name has been defined on any
singleton of C we don’t need to emit this check to the rule. Of course, we
need to invalidate such rule as soon as such method is defined.
3) Fixes potential race conditions in singleton creation.
These changes improve running time of specs significantly (2x):
10-06 (tomat)
Fixes allocation of structs. A struct can always be allocated by calling new
or allocate with no parameters or calling its constructor if available.
07-06 (tomat)
Initial work to improve singletons.
• Improves reflection cache generator – it searches IronRuby.dll for all
types marked by [ReflectionCache] attribute and generates ref-cache entries
for all their methods and properties marked with [Emitted] attribute.
• Merges RubyModule.Subclass into RubyModule, i.e. RubyModule now implements
IRubyObject.
• IRubyObjects now hold on their immediate class (not nominal class) and that
reference might change once from a non-singleton to a singleton class.
This change allows IRubyObject singletons (including modules and classes when
used in static method calls) to have the same rules as non-singleton objects.
The rule no longer needs to hold on such objects.
• Implements module freezing: methods, constants, instance and class variables,
mixins cannot be modified on a frozen module. Besides, if an object is frozen
its singleton class is (recursively) frozen as well.
• Fixes object freezing: instance variables cannot be modified on a frozen object
(we allowed it).
06-06 (tomat)
Fixes Ruby calls to protected generic methods.
05-06 (tomat)
Implements lazy method transformation. Previously a method was transformed to
DLR AST as soon as it was defined (def foo; …; end). We can postpone the
transformation until the method is called for the first time. This
significantly improves startup time. For example (not NGEN’d):
require 'benchmark'
Benchmark.bm { |x| x.report { require 'rubygems' } }
user system total real
eager transformation
1.622410 0.031200 1.653611 ( 1.581316)
lazy transformation
1.170008 0.031200 1.201208 ( 1.099220)
Although Ruby methods (unlike block) don’t close over variables we still need
2 closure variables: the parent lexical runtime scope and the module that the
method is declared in (for implementation of super). These were previously
DLR closure variables. They are live constants now. Ruby method
pre-compilation would require additional work, so we don’t support it for now.
04-06 (tomat)
http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1509&ProjectName=ironruby:
Proc.to_s should include line number where the block was declared
03-06 (sborde)
Reimplemented File.expand_path such that it does not use System.IO.Path.
This allows us to get better compatibility with MRI.
The motivating reason was that RSpec does File.expand_path("filename:linenumber"),
and the old implementation complained that : is not valid in filenames, whereas
MRI allows such input
Fixed "[nil].uniq" - Cucumber was running into this.
Renamed scripts\ruby19.bat to ruby1.9.bat as "mspec -tr19" seems to have changed.
Fix non-deterministic Rake test for "multitask" by adding
semaphore.synchronize around array access
Changed default.mspec so that :core properly excludes the thread tests
03-06 (jomes)
Make Expression.Type and Expression.NodeType virtual properties, and remove
TypeImpl & NodeTypeImpl. This fixes 4 fxcop warnings caused by the *Impl methods,
and results in a better API for end users.
02-06 (tomat)
Refactors AstGenerator so that we can use its new instance for each compiled
method. This is a preparation for lazy method compilation.
http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1184:
public(:foo) does not work correctly for mixed-in methods
http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1060:
visibility of send :define_method Title is required
Factors super-forwarders into a separate SuperForwarderInfo <: RubyMemberInfo
(it used to be just a flag on member info). The super-forwarder needs to
remember the name of the method to forward to since that can change if
it’s aliased (see Visibility2C test case).
Fixes assertion in RubyOverloadResolver - it wasn't expecting DynamicMethod
stubs generated by super calls.
Also fixes the super stubs to throw an exception if the super method is abstract.
http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1345:
load_assembly(<partial_name>) should work
http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1501:
WinForms broken
http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1344:
System.Action.new does not work
http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=917:
Passing a Ruby array to a .NET method that expects an IEnumerable derivative
fails with GetEnumerator call
+ fixes incorrect caching of TypeGroup#new.
Class#clr_member no longer throws an exception if called on Ruby class – it
returns a group of all inherited CLR methods of given name (if there are any).
Improves display name of generic types: e.g. Action<int> displays as
System::Action[Fixnum].
http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1470 : Can't call
the BigIntegerOverload of a method with a DefaultProtocol Attribute on the
BigInteger attribute
+ Bignum.new(1) should call method_missing:
irb(main):001:0> Bignum.new(1)
NoMethodError: undefined method `new' for Bignum:Class
01-06 (jimmysch)
Allow Silverlight binary location to be adjusted based on a msbuild variable.
Merlin builds use the well-known SL path in the source tree by default. A
"SilverlightPath" msbuild variable can be passed to look for the SL binaries
there. For IronRuby and IronPython external SL builds either the
"SilverlightPath" variable can be set to Silverlight's install location,
or the necessary Silverlight binaries can be copied to
Merlin/Main/Utilities/Silverlight.
Also scoots around aliases to Silverlight directories.
01-06 (jdeville)
* Added and modified tests to increase code coverage
* Rolls in cominteropfix shelveset to make the cominterop generic test
actually run COM interop tests
* Moves Rubygems tests to External\Languages\IronRuby\RubyGems-1_3_1-test
* Removes Rubygems 1.2 tests
* Fixes Rubygems test runner for the above.
* makes irtests run the core tests split up, adds cominterop
* splits out thread tests into a separate test list
* makes ir.cmd use TEST_OPTIONS
31-5 (tomat)
ClrMembers
29-5 (tomat)
Overrides4
28-5 (jdeville)
* Remove temp.rb from IRPowershell, it was only needed to test the script
during development.
* Port minsysreq and minsysreq_ps. Next step will be to generalize them to
some different apps.
26-5 (tomat)
Fixes handling of CLR protected and private methods and properties.
Enables generic methods in ClsTypeEmitter.
Removes RubyCallFlag.TryCall – it’s not used anymore.
Fixes calls to Object.Equals instance/static methods.
Notes on visibility:
Ruby visibility is orthogonal to CLR visibility.
Ruby visibility is mutable (can be changed using
Kernel#public/private/protected methods), CLR visibility is not.
A CLR method group can comprise of methods of different CLR visibility.
Ruby visibility applies on the group as a whole.
Ruby-protected members can only be called from a scope whose self immediate
class is a descendant of the method owner.
CLR-protected members can only be called if the receiver is a descendant of
the method owner.
Ruby-private members can only be called with an implicit receiver (self).
CLR-private members can only be called in PrivateBinding mode
(-X:PrivateBinding command line option), the receiver might be explicit or
implicit.
Tests:
Since protected methods can only be called on a derived class instance the
specs need to be adjusted accordingly.
I’ve fixed generic_spec nad overload_spec and commented out a block in
protected_spec – all the cases there need to be changed to negative cases
(all should fail).
Removed ROWAN_BIN check in
External.LCA_RESTRICTED\Languages\IronRuby\mspec\default.mspec
so that mspec picks up IR_OPTIONS even if ROWAN_BIN is not set.
22-05 (jdevillle)
(jdeville) Regressions tests for the following CP bugs.
!!!!!Note that closing 1351 means we are upgrading redist-libs and rubygems!!!!:
ID Title
374 irails Foo: undefined method for OpenSLL::Random.random_bytes
459 throw FileNotFoundException => rescue Errno.NoEntryError
466 ''.split(//, -1) returns [""] instead of []
572 Error when running Cucumber examples with IronRuby
614 ci_files set needed in mspec config
718 IronRuby ignores RUBYLIB environment variable
727 to_proc not working
814 Allocator underfined for <type> (TypeError)
940 Can't inherit from abstract classes
1028 Missing conversion from Duration to Fixnum (ActiveSupport)?
1351 redist-libs should have rubygems-1.3.1
1352 Test Defects
Also:
* Categorizes uncategorized specs
* includes a TraceListener in default.mspec.
21-05 (tomat)
Improves DLR interop: adds support for GetMember/SetMember with
method_missing, Binary/Unary ops, indexers.
Fixes bugs in DLR interop.
|