[#24648] [Bug #1852] Enumerable's #hash Raises ArgumentError When Recursive Values are Present — Run Paint Run Run <redmine@...>

Bug #1852: Enumerable's #hash Raises ArgumentError When Recursive Values are Present

20 messages 2009/08/01
[#24649] Re: [Bug #1852] Enumerable's #hash Raises ArgumentError When Recursive Values are Present — Tanaka Akira <akr@...> 2009/08/01

In article <4a73e51b5a4f9_138119f2a982704e@redmine.ruby-lang.org>,

[#24652] Re: [Bug #1852] Enumerable's #hash Raises ArgumentError When Recursive Values are Present — Run Paint Run Run <runrun@...> 2009/08/01

> Is it valuable to implement such function?

[#24682] Re: [Bug #1852] Enumerable's #hash Raises ArgumentError When Recursive Values are Present — Tanaka Akira <akr@...> 2009/08/02

In article <67e307490908010125r6fa76654pa8e2224f714588fc@mail.gmail.com>,

[#24673] [Feature #1857] install *.h and *.inc — Roger Pack <redmine@...>

Feature #1857: install *.h and *.inc

21 messages 2009/08/01

[#24732] [Bug #1873] MatchData#[]: Omits All But Last Captures Corresponding to the Same Named Group — Run Paint Run Run <redmine@...>

Bug #1873: MatchData#[]: Omits All But Last Captures Corresponding to the Same Named Group

12 messages 2009/08/03

[#24775] [Feature #1889] Teach Onigurma Unicode 5.0 Character Properties — Run Paint Run Run <redmine@...>

Feature #1889: Teach Onigurma Unicode 5.0 Character Properties

30 messages 2009/08/05

[#24786] [Bug #1893] Recursive Enumerable#join is surprising — Jeremy Kemper <redmine@...>

Bug #1893: Recursive Enumerable#join is surprising

24 messages 2009/08/06
[#28422] [Bug #1893] Recursive Enumerable#join is surprising — Yusuke Endoh <redmine@...> 2010/03/02

Issue #1893 has been updated by Yusuke Endoh.

[#28438] Re: [Bug #1893] Recursive Enumerable#join is surprising — Yukihiro Matsumoto <matz@...> 2010/03/03

Hi,

[#24854] embedding ruby 1.9 frustration — Rolando Abarca <funkaster@...>

Hello,

12 messages 2009/08/10

[#24982] [Feature #1961] Kernel#__dir__ — Yutaka HARA <redmine@...>

Feature #1961: Kernel#__dir__

26 messages 2009/08/19
[#28898] [Feature #1961] Kernel#__dir__ — Roger Pack <redmine@...> 2010/03/23

Issue #1961 has been updated by Roger Pack.

[#28900] Re: [Feature #1961] Kernel#__dir__ — Kornelius Kalnbach <murphy@...> 2010/03/23

On 23.03.10 19:10, Roger Pack wrote:

[#25025] [Backport #1975] Backport Dir.mktmpdir — Kirk Haines <redmine@...>

Backport #1975: Backport Dir.mktmpdir

12 messages 2009/08/21

[#25041] Proposal: Simpler block format — Yehuda Katz <wycats@...>

I'd like to propose that we add the following syntax for procs in Ruby:

45 messages 2009/08/23
[#25046] Re: Proposal: Simpler block format — Caleb Clausen <caleb@...> 2009/08/23

Yehuda Katz wrote:

[#25049] Re: Proposal: Simpler block format — Yehuda Katz <wycats@...> 2009/08/23

On Sat, Aug 22, 2009 at 7:38 PM, Caleb Clausen <caleb@inforadical.net>wrote:

[#25058] Re: Proposal: Simpler block format — Yukihiro Matsumoto <matz@...> 2009/08/23

Hi,

[#25059] Re: Proposal: Simpler block format — Yehuda Katz <wycats@...> 2009/08/23

On Sun, Aug 23, 2009 at 3:33 PM, Yukihiro Matsumoto <matz@ruby-lang.org>wrote:

[#25063] Re: Proposal: Simpler block format — "David A. Black" <dblack@...> 2009/08/23

Hi --

[#25068] Re: Proposal: Simpler block format — brian ford <brixen@...> 2009/08/24

Hi,

[#25086] [Bug #1991] ruby should use twolevel namespace on OS X — Michal Suchanek <redmine@...>

Bug #1991: ruby should use twolevel namespace on OS X

12 messages 2009/08/24

[#25208] Module#prepend and Array#prepend — Yehuda Katz <wycats@...>

Matz,

23 messages 2009/08/30

[#25210] [Feature #2022] Patch for ruby-1.8.6 and openssl-1.0 — Jeroen van Meeuwen <redmine@...>

Feature #2022: Patch for ruby-1.8.6 and openssl-1.0

15 messages 2009/08/30

[#25220] [Bug #2026] String encodings are not supported by most of IO on Linux — Vit Ondruch <redmine@...>

Bug #2026: String encodings are not supported by most of IO on Linux

18 messages 2009/08/31

[ruby-core:24922] extending '-S' to make working with multiple ruby VM's easier

From: Stephen Bannasch <stephen.bannasch@...>
Date: 2009-08-14 21:29:34 UTC
List: ruby-core #24922
This may be an email better addressed to rubygems-developers but 
since it also involves how Ruby VMs implement the '-S' functionality 
I thought I'd ask here first.

JRuby appears to add an additional function when started with '-S' 
that other Ruby VMs don't -- effectively looking first for ruby 
executables in a bin/ directory located on a path relative to the 
location of the jruby executable itself.

This can make working with multiple Ruby VMs easier but ruby19 
doesn't appear to work this way.

I am doing some work on a gem (has_many_polynmorphs) and trying to 
get it working in ruby 1.8.x and ruby 1.9.x as well as in MRI and in 
JRuby.

As long as I have an executable 'jruby' on my path I can switch from 
using installed ruby executables in MRI and the ones installed for 
jruby in a single session easily by prefixing 'jruby -S' to my 
commands when I want the jruby versions.

However this only partially works using ruby19.

I think the issues may be both in rubygems and in how the VM 
implements the '-S' functionality.

I know that the JRuby team has added some extra functionality to '-S' 
that isn't in the MRI VMs.

Here's how '-S' is documented in ruby19

   -S  look for the script using PATH environment variable

Here's how '-S' is documented in jruby

   -S  look for the script in bin or using PATH environment variable

I try to leave the system ruby and it's gem repository alone when 
working with multiple ruby VMs and instead install the alternative 
VMs in mm home dir:

My installed MRI is 1.8.6

   $ gem env
   RubyGems Environment:
     - RUBYGEMS VERSION: 1.3.3
     - RUBY VERSION: 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]
     - INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8
     - RUBY EXECUTABLE: 
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
     - EXECUTABLE DIRECTORY: /usr/bin
     - RUBYGEMS PLATFORMS:
       - ruby
       - universal-darwin-9
     - GEM PATHS:
        - /Library/Ruby/Gems/1.8
        - /Users/stephen/.gem/ruby/1.8
        - 
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
     - GEM CONFIGURATION:
        - :update_sources => true
        - :verbose => true
        - :benchmark => false
        - :backtrace => false
        - :bulk_threshold => 1000
        - :sources => ["http://gems.rubyforge.org", "http://gems.github.com"]
     - REMOTE SOURCES:
        - http://gems.rubyforge.org
        - http://gems.github.com

I have both JRuby and ruby19 installed in different locations in my home dir:

   $ which jruby
   /Users/stephen/dev/ruby/src/jruby.git/bin/jruby

   $ jruby -S gem env
   RubyGems Environment:
     - RUBYGEMS VERSION: 1.3.3
     - RUBY VERSION: 1.8.7 (2009-08-09 patchlevel 174) [java]
     - INSTALLATION DIRECTORY: 
/Users/stephen/dev/ruby/src/jruby.git/lib/ruby/gems/1.8
     - RUBY EXECUTABLE: /Users/stephen/dev/ruby/src/jruby.git/bin/jruby
     - EXECUTABLE DIRECTORY: /Users/stephen/dev/ruby/src/jruby.git/bin
     - RUBYGEMS PLATFORMS:
       - ruby
       - universal-java-1.5
     - GEM PATHS:
        - /Users/stephen/dev/ruby/src/jruby.git/lib/ruby/gems/1.8
        - /Users/stephen/.gem/jruby/1.8
     - GEM CONFIGURATION:
        - :update_sources => true
        - :verbose => true
        - :benchmark => false
        - :backtrace => false
        - :bulk_threshold => 1000
        - "install" => "--env-shebang"
        - "update" => "--env-shebang"
        - :sources => ["http://gems.rubyforge.org", "http://gems.github.com"]
     - REMOTE SOURCES:
        - http://gems.rubyforge.org
        - http://gems.github.com

Using '-S' to run the gem installed with ruby19 also works:

   $ which ruby19
   /usr/local/bin/ruby19

   $ ls -l /usr/local/bin/ruby19
   /usr/local/bin/ruby19 -> /Users/stephen/dev/ruby/builds/ruby19

   $ ruby19 -S gem env
   RubyGems Environment:
     - RUBYGEMS VERSION: 1.3.4
     - RUBY VERSION: 1.9.2 (2009-08-14 patchlevel -1) [i386-darwin9.8.0]
     - INSTALLATION DIRECTORY: 
/Users/stephen/dev/ruby/builds/mri/trunk/lib/ruby/gems/1.9.1
     - RUBY EXECUTABLE: /Users/stephen/dev/ruby/builds/mri/trunk/bin/ruby
     - EXECUTABLE DIRECTORY: /Users/stephen/dev/ruby/builds/mri/trunk/bin
     - RUBYGEMS PLATFORMS:
       - ruby
       - x86-darwin-9
     - GEM PATHS:
        - /Users/stephen/dev/ruby/builds/mri/trunk/lib/ruby/gems/1.9.1
        - /Users/stephen/.gem/ruby/1.9.1
     - GEM CONFIGURATION:
        - :update_sources => true
        - :verbose => true
        - :benchmark => false
        - :backtrace => false
        - :bulk_threshold => 1000
        - :sources => ["http://gems.rubyforge.org", "http://gems.github.com"]
     - REMOTE SOURCES:
        - http://gems.rubyforge.org
        - http://gems.github.com

Running an executable like rake works if it doesn't invoke other 
tasks in jruby and ruby19:

   $ jruby -S rake -T
   (in /Users/stephen/dev/ruby/src/gems/has_many_polymorphs-git)
   rake announce                 # Generate a release announcement, 
edit it, a ...
   ...

   $ ruby19 -S rake -T
   (in /Users/stephen/dev/ruby/src/gems/has_many_polymorphs-git)
   rake announce                 # Generate a release announcement, 
edit it, a ...
   ...

Running tests for the has_many_polymorphs gem operates correctly in 
jruby (there are errors but that's a separate problem).

The tests do NOT run in ruby19.

I get a number of 'Invalid .gemspec format' for installed gems in 
ruby19 and when multi_rails runs this code

   Gem::cache.find_name("rails").empty?

to check for the existence of an installed Rails gem it fails with this error:

   relevance-multi_rails-0.0.8/lib/multi_rails/loader.rb:37:in 
`verify_rails_installed': No Rails gems installed! (MultiRailsError)

The full trace for that line confirms that the gem is running from 
ruby19's gem repo -- here's the path prefixed to the previous error:

   /Users/stephen/dev/ruby/builds/mri/trunk/lib/ruby/gems/1.9.1/gems

However running this same code in ruby19 irb succeeds:

   $ ruby19 -S irb
   irb(main):001:0> Gem::cache.find_name("rails").empty?
   => false

What is jruby doing differently that ruby19 isn't?

Is adding the additional jruby functionality with '-S' compatible with ruby19?

Is there another way to get the functionality I am looking for where 
I can have many Ruby VMs installed and easily switch between them?


In This Thread

Prev Next