"Yvon Thoraval" <yvon.thoravalNO-SPAM / free.fr> schrieb im Newsbeitrag
news:1gbat4z.108b9591bhia0iN%yvon.thoravalNO-SPAM / free.fr...
> i'm transalating a BeanShell prog using :
> Map fieldsHash = new LinkedHashMap();
> fieldsHash.put("btl_desc", "Description");
> fieldsHash.put("btl_vintage", "Millesime");
> fieldsHash.put("btl_buy_date", "Date achat");
> fieldsHash.put("wcol_id", "Coul.");
> fieldsHash.put("btl_init_nbr", "Qte A");
> fieldsHash.put("btl_current_nbr", "Qte R");
>
> i've seen the PseudoHash of Gotoken :

<snip/>

> i want to emulate that LinkedHashMap into ruby without calling the java
> class (it's possible because i'm using JRuby) how could i make
> modifications, if any, Gotoken's code for that ?

Dunno that class but what is it that you want to achieve?  Do you need a
sorted Hash?  Then you can easily do

h = {}
# modify h
h.sort.each do |key, val|
  # ...
end

or even

h.sort {|a,b| a <=> b}.each do |key, val|
  # ...
end

Kind regards

    robert