[#32676] VC++ embedded rubygems gives NoMethodError undefined method `synchronize' for Mutex — Phlip <phlip2005@...>
[I will try Bill Kelly's PDB path advice presently; this issue is more
5 messages
2010/10/03
[#32687] Re: VC++ embedded rubygems gives NoMethodError undefined method `synchronize' for Mutex
— Roger Pack <rogerdpack2@...>
2010/10/04
> This one's about...
[#32703] Re: VC++ embedded rubygems gives NoMethodError undefined method `synchronize' for Mutex
— Phlip <phlip2005@...>
2010/10/05
> > #<NoMethodError: undefined method `synchronize' for #<Mutex:0x750faa8>>
[#32698] [Ruby 1.9-Feature#3908][Open] private constant — Yusuke Endoh <redmine@...>
Feature #3908: private constant
10 messages
2010/10/05
[#32790] ruby with near native speed — Ondřej Bílka <neleai@...>
Hello
4 messages
2010/10/14
[#32795] Call for Cooperation: CFUNC usage survey — SASADA Koichi <ko1@...>
Hi,
5 messages
2010/10/15
[#32814] WeakHash — Santiago Pastorino <santiago@...>
Hi guys,
6 messages
2010/10/15
[#32844] [Ruby 1.9-Feature#3963][Open] Map class in standard library — Thomas Sawyer <redmine@...>
Feature #3963: Map class in standard library
3 messages
2010/10/18
[#32864] [Ruby 1.9-Bug#3972][Open] r28668 breaks test/unit when combined with the testing rake task — Aaron Patterson <redmine@...>
Bug #3972: r28668 breaks test/unit when combined with the testing rake task
6 messages
2010/10/20
[#32932] Behavior of initialize in 1.9 — Aaron Patterson <aaron@...>
The behavior of initialize in 1.9 seems to have changed. Here is an irb
5 messages
2010/10/28
[#32960] [Ruby 1.9-Bug#4005][Open] YAML fails to roundtrip Time objects — Peter Weldon <redmine@...>
Bug #4005: YAML fails to roundtrip Time objects
6 messages
2010/10/29
[#32976] Improve MinGW builds for Ruby 1.8.7, 1.9.2 and 1.9.3 — Luis Lavena <luislavena@...>
Hello,
10 messages
2010/10/30
[#32978] Re: Improve MinGW builds for Ruby 1.8.7, 1.9.2 and 1.9.3
— Aaron Patterson <aaron@...>
2010/10/30
On Sun, Oct 31, 2010 at 03:42:02AM +0900, Luis Lavena wrote:
[ruby-core:32719] Re: [Ruby 1.9-Feature#3845][Open] "in" infix operator
From:
"Etienne Vallette d'Osia" <etienne.vallettedosia@...>
Date:
2010-10-08 08:21:46 UTC
List:
ruby-core #32719
Hi,
On Fri, Oct 8, 2010 at 9:16 AM, "Martin J. D=FCrst" <duerst@it.aoyama.ac.jp=
>wrote:
> I would understand that if it were [a, b, c].included? x
> But it's include?, so the order seems just fine. Easy to read as
> "does [a, b, c] include x?". Any other order would feel strange, wouldn't
> it?
>
> Also, an 'in?' method on Object has been proposed, so that you can write
> x.in? [a, b, c]
> That's very short, and fully object oriented pure Ruby, no syntactic suga=
r
> necessary.
I totally agree : in as keyword is too different than the rest of Ruby
syntax.
I fear this kind of add would make Ruby syntax cryptic...
>
> 3) it is inefficient; new array object is created every times
>>
>
> That's a problem for a good compiler/interpreter. There are many cases in
> Ruby where similar stuff happen, and nevertheless, many people are using
> Ruby. If it really needs to be fast, why not use C or so?
>
>
What about
x.in?(a, b, c)
The Ruby naive implementation is really simple
class Object
def in?(*collections)
collections.any?{|c| c.include?(self) }
end
end
but I guess a C version could add optimizations (but are they needed ?)
Regards,
=C9tienne
--=20
=C9tienne Vallette d'Osia