[#18121] [Ruby 1.8.7 - Bug #405] (Open) ssl.rb:31: [BUG] Bus Error — Anonymous <redmine@...>

Issue #405 has been reported by Anonymous.

14 messages 2008/08/04

[#18130] Re: New array methods cycle, choice, shuffle (plus bug in cycle) — Brian Candler <B.Candler@...>

> Seriously though... Array.first is a noun.

10 messages 2008/08/05

[#18319] NEW Command: absolute_path() -- — "C.E. Thornton" <admin@...>

Core,

14 messages 2008/08/16
[#18321] Re: NEW Command: absolute_path() -- — Yukihiro Matsumoto <matz@...> 2008/08/18

Hi,

[#18381] [Bug #496] DRb.start_service(nil) is very slow — Hongli Lai <redmine@...>

Bug #496: DRb.start_service(nil) is very slow

11 messages 2008/08/25

[ruby-core:18151] Re: New array methods cycle, choice, shuffle (plus bug in cycle)

From: Phil Hagelberg <phil@...>
Date: 2008-08-06 16:31:29 UTC
List: ruby-core #18151
Jim Weirich <jim.weirich@gmail.com> writes:

> No, I think you are wildly off base with this suggestion.  However, I
> am considering proposing a version of Lisp's cxxxr functions (e.g.
> cadr, caddr) to navigate arbitrarily nested array structures.

Great idea! Here's some code from Bus Scheme[1] that does that:

>     def method_missing(sym)
>       sym = sym.to_s
>       return super(sym) unless sym =~ /^c([ad]+)r/
>
>       case sym
>       when /^c(a|d)r$/
>         send(sym)
>       when /^ca/
>         send(sym.sub('a', '')).car
>       when /^cd/
>         send(sym.sub('d', '')).cdr
>       end
>     end
>   end
>
>   alias_method :car, :first
>   def cdr; self[1 .. -1]; end

Oops; a bit late for April Fools' day; sorry.

-Phil

[1] Scheme written in Ruby, but implemented while riding the bus:
http://bus-scheme.rubyforge.org

In This Thread