Created
April 24, 2012 22:59
-
-
Save jfirebaugh/2484455 to your computer and use it in GitHub Desktop.
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
| diff --git a/kernel/bootstrap/channel.rb b/kernel/bootstrap/channel.rb | |
| index 14a7556..7ac9bad 100644 | |
| --- a/kernel/bootstrap/channel.rb | |
| +++ b/kernel/bootstrap/channel.rb | |
| @@ -73,36 +73,5 @@ module Rubinius | |
| Rubinius.primitive :channel_try_receive | |
| raise PrimitiveFailure, "Channel#try_receive primitive failed" | |
| end | |
| - | |
| - ## | |
| - # Converts +obj+ into a Channel using #to_channel. | |
| - | |
| - def self.convert_to_channel(obj) | |
| - return obj if Channel === obj | |
| - begin | |
| - o2 = obj.to_channel | |
| - unless Channel === o2 | |
| - raise ArgumentError, "to_channel on #{obj.inspect} did not return a Channel" | |
| - end | |
| - return o2 | |
| - rescue NoMethodError | |
| - raise ArgumentError, "Unable to convert #{obj.inspect} into a channel" | |
| - end | |
| - end | |
| - | |
| - ## | |
| - # Legacy API. To be removed. | |
| - | |
| - def self.receive(obj) # :nodoc: | |
| - return convert_to_channel(obj).receive | |
| - end | |
| - | |
| - ## | |
| - # API compliance, returns self. | |
| - | |
| - def to_channel | |
| - self | |
| - end | |
| - | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment