Forum: IronRuby Error Using Bewildr Gem in V1.1.2

Posted by Jones, Larry (Guest)
on 2011-02-09 19:51
Attachment: image001.png (12 KB)
(Received via mailing list)
_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core
Posted by Thibaut Barrère (thbar)
on 2011-02-09 20:00
(Received via mailing list)
Hi Larry,

undefined method `flatten' for {:name=>"Modeling"}:Hash (NoMethodError)
>

I can reproduce this here as well: https://gist.github.com/819024

My understanding is that Hash#flatten only exist on 1.9 and not on 1.8.

Is there a regression here maybe ?

-- Thibaut
Posted by Tomas Matousek (Guest)
on 2011-02-09 22:20
(Received via mailing list)
One possible explanation is following: If you run the gem with IronRuby 
1.0 it runs in 1.8.6 compat mode. There may be a condition that checks 
for the RUBY_VERSION in the gem. On Ruby 1.1.2 the RUBY_VERSION is 1.9.2 
and thus some other code path might be executed that depends on 
Hash#flatten. I don't think we regressed, it's just a missing feature. 
Feel free to implement it and send a pull request.

Tomas

From: ironruby-core-bounces@rubyforge.org 
[mailto:ironruby-core-bounces@rubyforge.org] On Behalf Of Thibaut Barrre
Sent: Wednesday, February 09, 2011 11:00 AM
To: ironruby-core@rubyforge.org
Subject: Re: [Ironruby-core] Error Using Bewildr Gem in V1.1.2

Hi Larry,
undefined method `flatten' for {:name=>"Modeling"}:Hash (NoMethodError)

I can reproduce this here as well: https://gist.github.com/819024

My understanding is that Hash#flatten only exist on 1.9 and not on 1.8.

Is there a regression here maybe ?

-- Thibaut
Posted by Thibaut Barrère (thbar)
on 2011-02-10 10:33
(Received via mailing list)
Hi Thomas,

> One possible explanation is following: If you run the gem with IronRuby 1.0
> it runs in 1.8.6 compat mode. There may be a condition that checks for the
> RUBY_VERSION in the gem. On Ruby 1.1.2 the RUBY_VERSION is 1.9.2 and thus
> some other code path might be executed that depends on Hash#flatten. I dont
> think we regressed, its just a missing feature. Feel free to implement it
> and send a pull request.

I'll take this one, now that I've got the build working on Mac OS X.

I will ask you tips if I meet issues while running the test suite there.

-- Thibaut
Posted by Nat Ritmeyer (natritmeyer)
on 2011-02-10 22:47
Fixed! I've just pushed a new version of bewildr (0.1.11) to allow 
running under ironruby 1.1.1 and 1.1.2. You can read about the fix here:
http://www.natontesting.com/2011/02/10/bewildr-and...
Posted by Jones, Larry (Guest)
on 2011-02-11 00:04
(Received via mailing list)
Thanks for the quick fix!

---
Larry Jones
||| Senior Level Development Engineer
Aspen Technology, Inc. ||| +1 281-504-3324 ||| fax: 281-584-1062 |||
www.aspentech.com
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.