# Code Review: EventsAndSites5

**URL:** <https://www.ruby-forum.com/t/code-review-eventsandsites5/161284>\
**Category:** IronRuby\
**Created:** [February 25, 2009, 2:03am UTC](https://www.ruby-forum.com/t/code-review-eventsandsites5/161284 "2009-02-25T02:03:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![grujildo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/94ad74/32.png) [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Post date:** [February 25, 2009, 2:03am UTC](https://www.ruby-forum.com/t/code-review-eventsandsites5/161284/1 "2009-02-25T02:03:07Z")

</div>

tfpt review “/shelveset:EventsAndSites5;REDMOND\tomat”

DLR, Python:

- 

```
     Refactors Python's RelfectedEvent and moves the language 

```

independent part to DLR EventTracker.

- 

```
     Fixes CompilerHelpers.GetCallableMethod - it didn't throw for 

```

non-visible methods since TryGetCallableMethod never returns null.

- 

```
     Passes "run 0".

```

Ruby:

- 

```
     Implements events using EventTracker - an event can be hooked 

```

and unhooked in 2 ways now:

C#:

class C { public event Action\<string, string\> OnFoo; }

Ruby:  
def handler a,b  
puts ““handler: #{a} #{b}””  
end

c = C.new

# using a block:

h = c.on\_foo { |a,b| … }  
c.on\_foo.remove(h)

# using a method object:

h = method(:handler)  
c.on\_foo.add(h)  
c.on\_foo.remove(h)

- 

```
     Reimplements Enumerable::Enumerator, implements missing 

```

features and fixes bugs.

- 

```
     Changes default protocol for CLR string to allow nil unless 

```

NotNull attribute is specificed.

- 

```
     Removes static sites from builtins and YAML.

```

- 

```
     Refactors reflection cache generator to produce 

```

merge-friendly source code.

- 

```
     Disables protected method test - we relied on the above bug 

```

in DLR. We need to implement protected visibility check correctly.

Tomas
