# 1.9.1-rc2$B$N(BNEWS$B$NFbMF(B

**URL:** <https://www.ruby-forum.com/t/1-9-1-rc2-b-n-bnews-b-nfbmf-b/158904>\
**Category:** Development\
**Created:** [January 29, 2009, 8:39am UTC](https://www.ruby-forum.com/t/1-9-1-rc2-b-n-bnews-b-nfbmf-b/158904 "2009-01-29T08:39:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![akira\_yamada\_S\_SSB](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/46a35a/32.png) [@akira\_yamada\_S\_SSB](https://www.ruby-forum.com/u/akira_yamada_S_SSB)\
**Post date:** [January 29, 2009, 8:39am UTC](https://www.ruby-forum.com/t/1-9-1-rc2-b-n-bnews-b-nfbmf-b/158904/1 "2009-01-29T08:39:40Z")

</div>

1.9.1-rc2e$B$Ne(BNEWSe$B$NFbMF$K$D$$$F$N%3%a%s%H$H\>/$7\<ALd$G$9!#e(B

> === Compatibility issues
> 
> - language core
> - New syntax and semantics

to\_splate$B%a%=%C%I$O$J$5$=$&$G$9e(B(r14063e$B$G:o=|e(B?)

> ```
> o New semantics for constant definition in instance_eval
> or in module_eval.
> 
> ```

(e$B$h$/$o$+$j$^$;$s$G$7$?!#$3$l$K$D$$$F2?$+\>pJs$O$"$j$^$;$s$G$7$g$&$+!#e(B)

> - builtin classes and objects
> - Kernel and Object  
> o Kernel#methods and #singleton\_methods used to return an  
> array of strings but now they return an array of symbols.

{global,local,instance,class}\_valiablese$B$He(Bconstantse$B$b%7%s%%k$rJV$7$^$9!#e(B

> ```
> * Class and Module
> o Module#attr is an alias of attr_reader
> 
> ```

-we$B$G!Ve(Bwarning: optional boolean argument is obsoletede$B!W$He(B  
e$B=P$k$N$G$9$,F0:n\<+BN$O=\>MhDL$j$N$h$&$G$9!#!Ve(B[Ruby2]e$B!W$G$9$+$Me(B?

```
* Enumerable and Enumerator
      o Enumerable::Enumerator, compatibility alias of Enumerator,
        is removed.

```

aliase$B$H$"$C$F!“e(BEnumerable::Enumerator =  
Enumeratore$B$@$C$?$+$h$&$Je(B  
e$B0u\>]$r\<u$1$k$N$G$9$,!”\<B:]$K$O$=$&$G$O$J$$$G$9!#e(B

> - builtin classes and objects

> ```
> * IO operations
> o IO#initialize now accepts an IO argument
> 
> ```

ri IOe$B$K$be(BIO.new($stdout)e$B$H$$$&Nc$,$"$k$N$G$9$,!"e(B  
e$B\<B9T$9$k$H!Ve(Bcan’t convert IO into Integer  
(TypeError)e$B!W$H$$$&e(B  
e$BNc30$,5/$-$^$9!#e(B

> ```
> * String and Regexp
> o No longer an Enumerable
> 
> ```

e$B$3$l$Oe(BStringe$B$@$1$G$9$h$M!#e(B

> ```
> * Symbols: restriction on literal symbols
> 
> ```

[http://eigenclass.org/hiki/Changes+in+Ruby+1.9#l163](http://eigenclass.org/hiki/Changes+in+Ruby+1.9#l163)e$B$K$h$k$He(B  
e$B!Ve(B:$-)e$B!W$N$h$&$JIT@5$J%j%F%i%kI=8=$,$G$-$F$7$^$C$F$$$?e(B  
e$B$H$$$&OC$N$h$&$J$N$G$9$,!"3NG’$7$F$\_$k$H$=$NF0:n$Oe(B1.8.3e$B$^$G$G!"e(B  
1.8.4e$B$G$O!Ve(Bparse error, unexpected ‘)’, expecting  
$e$B!W$K$J$j$^$9!#e(B

> ```
> * Numeric
> o Numeric#div always rounds as Integer#div has done.
> o Numeric#fdiv: ditto.
> 
> ```

[http://eigenclass.org/hiki/Changes+in+Ruby+1.9#l103](http://eigenclass.org/hiki/Changes+in+Ruby+1.9#l103)e$B$K$h$k$He(B  
e$B!Ve(B-10.0.div(3)e$B!W!Ve(B-10.div(3)e$B!W$J$I$NCM$,$I$&$J$k$+$H$$$&OC$N$h$&$G$9!#e(B  
e$B$3$l$Oe(B1.8.4e$B"\*e(B1.8.5e$B$G$9$G$KJQ99$5$l$F$$$^$9!#e(B

> ```
> * $SAFE and bound methods
> 
> ```

e$B4\*0c$$$+$b$7$l$J$$$N$G$9$,e(B  
[http://eigenclass.org/hiki/Changes+in+Ruby+1.9#l164](http://eigenclass.org/hiki/Changes+in+Ruby+1.9#l164)e$B$K$h$k$He(B  
[http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-dev/23697](http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-dev/23697)e$B$+$i$N%9%l%C%Ie(B  
e$B$N$3$H$+$J$H;W$($^$9!#e(B

e$B$3$l$K$D$$$F$O$=$N8e$N$d$j\<h$j$Ge(B1.8.3e$B$"$?$j$KF~$C$?$h$&$G$9!#e(B

> ```
> o New trusted/untrusted model in addition to
> tainted/untainted model.
> 
> ```

e$B$G!"$3$A$i$Oe(B  
[http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-dev/35306](http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-dev/35306)e$B$G$9$M!#e(B

e$B$"$^$jM}2r$G$-$J$$$J$$$+$b$7$l$J$$$N$G$9$1$I!"e(B  
(a)$SAFE\<=2e$B$G30It$+$iF@$i$l$?%_%V%8%'%/%H$He(B  
(b)$SAFE\>=3e$B$G30It$+$iF@$i$l$?%_%V%8%'%/%H$r6hJL$7!“e(B  
$SAFE\>=4e$B$G$Oe(B(b)e$B$@$1$rJQ99$G$-$k!”$H$$$&$h$&$J$3$H$G$7$g$&$+!#e(B

e$BF0:n\>e$Oe(B$SAFE\>=4e$B$G$Oe(B  
obj.tainted? == truee$B$G$+$De(B  
obj.untrusted? == truee$B$G$"$ke(B  
e$B%\*%V%8%'%/%H$N$\_JQ99$G$-$k$H$$$&46$8$G$7$g$&$+!#e(B

> ```
> * Deprecation
> 
> ```

e$BB\>$K!Ve(B$=e$B!W$,;H$($J$/$J$C$?$H$$$&$N$b$"$j$=$&$G$9!#e(B

> - bundled libraries  
> === Language core changes
> - New syntax and semantics  
> o #[] can take splatted arguments, hash style arguments  
> and a block.

e$B$3$l$Oe(B[http://eigenclass.org/hiki/Changes+in+Ruby+1.9#l17](http://eigenclass.org/hiki/Changes+in+Ruby+1.9#l17)e$B$G$7$g$&$+!#e(B  
e$B!Ve(BFoo.new[\*a, :op =\> :+]{|x| x  
}e$B!W$N$h$&$J=q$-J}$,$G$-$k$H$$$&OC$G$9!#e(B

1.9.1rc2e$B$G$O!Ve(Bfoo[\*a,  
:b=\>1]e$B!W$H$O=q$1$k$h$&$K$J$C$F$$$^$9$,!"e(B  
e$B!Ve(Bfoo[1] {|x| …}e$B!W$H$O=q$1$J$$$h$&$G$9!#e(B

e$BB\>$K0J2\<$,$"$j$=$&$G$9!#e(B

- e$B9TF,!Ve(B.e$B!W$K$h$k9T7QB3e(B
- **ENCODING**
- def !=e$B!"e(Bdef !~e$B!"e(Bdef !
- ife$B$J$I$G$Ne(Bthene$B$NBe$o$j$Ne(B:
- begine$B!Ae(Bende$B0J30$G$Ne(Bretrye$B$OGQ;\_e(B
- evale$B$NBhFs0z?t$H$7$Fe(BProce$B%\*%V%8%'%/%H$rEO$;$J$/$J$C$?e(B

> === Library updates
> 
> - builtin classes and objects
> - Blocks and Procs  
> o Proc#yield

[http://eigenclass.org/hiki/Changes+in+Ruby+1.9#l44](http://eigenclass.org/hiki/Changes+in+Ruby+1.9#l44)e$B$G$7$g$&$+!#e(B  
e$B$h$/$o$+$i$J$+$C$?$N$G$9$,e(BProc#calle$B$NJLL\>$N$h$&$K8+$($^$9!#e(B

> ```
> o Passing blocks to #[]
> 
> ```

[http://eigenclass.org/hiki/Changes+in+Ruby+1.9#l46](http://eigenclass.org/hiki/Changes+in+Ruby+1.9#l46)e$B$@$H;W$$$^$9$,!“e(B  
e$B\>e$K$b=q$$$?DL$j!”!Ve(Bfoo[] {||}e$B!W$O%(%i!\<$K$J$j$^$9!#e(B

> ```
> * Hash
> o Hash#_compare_by_identity and Hash#compare_by_identity?
> 
> ```

e$B!Ve(BHash#\_compare\_by\_identitye$B!W$Oe(B  
e$B!Ve(BHash#compare\_by\_identitye$B!W$G$7$g$&$+!#e(B

> ```
> * Symbol
> o Symbol#=== matches strings
> 
> ```

e$B$A$g$C$H$o$+$i$J$+$C$?$N$G$9$,e(B  
e$B!Ve(B:s === "s"e$B!W$H$OJL$N$3$H$G$7$g$&$+!#e(B  
e$B!Ve(B:s === "s"e$B!W$Oe(Bfalsee$B$G$9!#e(B

> ```
> * Numeric
> o Numeric#upto, #downto, #times, #step
> 
> ```

uptoe$B!"e(Bdowntoe$B!"e(Btimese$B$Oe(B1.8/1.9e$B$H$b$K$J$/!“e(Bstepe$B$O$I$A$i$K$b$”$j$^$9!#e(B  
e$BF0:nJQ$o$C$?$J$I$G$7$g$&$+!#e(B

e$BA4BNE\*$K8+$F!“%a%=%C%IL\>$@$1=q$+$l$F$$$k$N$Oe(B  
e$BDI2C$5$l$?$+JQ99e(B(e$BHs8\_49$G$O$J$/5!G=DI2Ce(B?)e$B$,$”$C$?$+e(B  
e$B$N$I$A$i$+$N$h$&$G$7$?!#e(B  
e$B2DG=$J$i$=$N$I$A$i$+$@$1$G$b$o$+$k$h$&$K$J$C$F$$$k$He(B  
e$B$h$$$J$H;W$$$^$7$?!#e(B

e$B0J\>e$G$9!#e(B

---

<div class="post-metadata">

**Author:** ![akira\_yamada\_S\_SSB](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/46a35a/32.png) [@akira\_yamada\_S\_SSB](https://www.ruby-forum.com/u/akira_yamada_S_SSB)\
**Post date:** [January 29, 2009, 8:55am UTC](https://www.ruby-forum.com/t/1-9-1-rc2-b-n-bnews-b-nfbmf-b/158904/2 "2009-01-29T08:55:38Z")

</div>

okkez e$B$G$9!#e(B

e$B\<+J,$bD4$Y$F$$$k:GCf$G$9!#e(B  
e$B$o$+$kItJ,$@$1%3%a%s%H$7$^$9!#e(B

# e$B$[$H$s$I$o$+$i$J$$!#!#!#e(B

2009/01/29 16:36 akira yamada / e$B$d$^$@$"$-$ie(B [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> 1.9.1-rc2e$B$Ne(BNEWSe$B$NFbMF$K$D$$$F$N%3%a%s%H$H\>/$7\<ALd$G$9!#e(B

(snip)

> to\_splate$B%a%=%C%I$O$J$5$=$&$G$9e(B(r14063e$B$G:o=|e(B?)
> 
> > ```
> > o New semantics for constant definition in instance_eval
> > or in module_eval.
> > 
> > ```
> 
> (e$B$h$/$o$+$j$^$;$s$G$7$?!#$3$l$K$D$$$F2?$+\>pJs$O$"$j$^$;$s$G$7$g$&$+!#e(B)

e$B0J2\<$N$h$&$K!"0JA0$H$O0c$C$FDj?t$rDj5A$9$k%9%3!\<%W$,JQ$o$C$?$h$&$G$9!#e(B

class A  
end

a = A.new  
a.instance\_eval{ B = ‘constant B’ }  
A.module\_eval{ C = ‘constant C’ }

B # =\> “constant B” # 1.8.7

# =\> uninitialized constant B (NameError) # 1.9.1

C # =\> “constant C” # 1.8.7

# =\> uninitialized constant C (NameError) # 1.9.1

(class \<\< a ; self end)::B # =\> “constant B” # 1.9.1  
A::C # =\> “constant C” # 1.9.1

a.instance\_eval{ :😃 = ‘constant D’ }  
A.module\_eval{ ::E = ‘constant E’ }

D # =\> “constant D” # e$B6&DLe(B  
E # =\> “constant E” # e$B6&DLe(B

> e$BA4BNE\*$K8+$F!“%a%=%C%IL\>$@$1=q$+$l$F$$$k$N$Oe(B  
> e$BDI2C$5$l$?$+JQ99e(B(e$BHs8\_49$G$O$J$/5!G=DI2Ce(B?)e$B$,$”$C$?$+e(B  
> e$B$N$I$A$i$+$N$h$&$G$7$?!#e(B  
> e$B2DG=$J$i$=$N$I$A$i$+$@$1$G$b$o$+$k$h$&$K$J$C$F$$$k$He(B  
> e$B$h$$$J$H;W$$$^$7$?!#e(B

e$BF10U$7$^$9!#e(B

---

<div class="post-metadata">

**Author:** ![akira\_yamada\_S\_SSB](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/46a35a/32.png) [@akira\_yamada\_S\_SSB](https://www.ruby-forum.com/u/akira_yamada_S_SSB)\
**Post date:** [January 30, 2009, 3:06am UTC](https://www.ruby-forum.com/t/1-9-1-rc2-b-n-bnews-b-nfbmf-b/158904/3 "2009-01-30T03:06:25Z")

</div>

okkez e$B$G$9!#e(B

e$B\>/$7$:$DD4$Y$F$^$9$,!"$o$+$C$?e(B(e$B$H;W$&e(B)e$B$b$N$@$1%3%a%s%H$7$^$9!#e(B

2009/01/29 16:36 akira yamada / e$B$d$^$@$"$-$ie(B [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> 1.9.1-rc2e$B$Ne(BNEWSe$B$NFbMF$K$D$$$F$N%3%a%s%H$H\>/$7\<ALd$G$9!#e(B  
> (snip)
> 
> > === Library updates
> > 
> > - builtin classes and objects
> > - Blocks and Procs  
> > o Proc#yield
> 
> [http://eigenclass.org/hiki/Changes+in+Ruby+1.9#l44](http://eigenclass.org/hiki/Changes+in+Ruby+1.9#l44)e$B$G$7$g$&$+!#e(B  
> e$B$h$/$o$+$i$J$+$C$?$N$G$9$,e(BProc#calle$B$NJLL\>$N$h$&$K8+$($^$9!#e(B

e$B%=!\<%9$r$\_$?$i!"0J2\<$N$h$&$KDj5A$5$l$F$$$^$7$?!#e(B

# proc.c e$B$+$i!#e(B

```
rb_define_method(rb_cProc, "call", proc_call, -1);
rb_define_method(rb_cProc, "[]", proc_call, -1);
rb_define_method(rb_cProc, "===", proc_call, -1);
rb_define_method(rb_cProc, "yield", proc_call, -1);

```

> > ```
> > * Symbol
> > o Symbol#=== matches strings
> > 
> > ```
> 
> e$B$A$g$C$H$o$+$i$J$+$C$?$N$G$9$,e(B  
> e$B!Ve(B:s === "s"e$B!W$H$OJL$N$3$H$G$7$g$&$+!#e(B  
> e$B!Ve(B:s === "s"e$B!W$Oe(Bfalsee$B$G$9!#e(B

$ ./ruby -ve ‘p :s ===“s”’  
ruby 1.9.0 (2008-10-04 revision 19669) [i686-linux]  
true  
$ ruby-1.9.1 -ve ‘p :s === “s”’  
ruby 1.9.1p0 (2009-01-28 revision 21860) [i686-linux]  
false

e$B$3$&$J$j$^$7$?!#e(B

---

<div class="post-metadata">

**Author:** ![akira\_yamada\_S\_SSB](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/46a35a/32.png) [@akira\_yamada\_S\_SSB](https://www.ruby-forum.com/u/akira_yamada_S_SSB)\
**Post date:** [January 30, 2009, 8:18am UTC](https://www.ruby-forum.com/t/1-9-1-rc2-b-n-bnews-b-nfbmf-b/158904/4 "2009-01-30T08:18:24Z")

</div>

ã€€ã„ã‚ã„ã‚ã¨ã”æŒ‡æ‘˜æ„Ÿè¬ã—ã¾ã™ã€‚

ã€€ã±ã£ã¨è¦‹ã¦æ˜Žã‚‰ã‹ãªã¨ã“ã‚ã ã‘ã€‚

At Thu, 29 Jan 2009 16:36:19 +0900,  
akira yamada / ã‚„ã¾ã ã‚ãã‚‰ wrote:

> > ```
> > * String and Regexp
> > o No longer an Enumerable
> > 
> > ```
> 
> ã“ã‚Œã¯Stringã ã‘ã§ã™ã‚ˆã­ã€‚

ã¾ã¨ã¾ã£ã¦ã—ã¾ã£ã¦ã„ãŸã®ã§åˆ†ã‘ã¾ã—ãŸã€‚

> > ```
> > * Deprecation
> > 
> > ```
> 
> ä»–ã«ã€Œ$=ã€ãŒä½¿ãˆãªããªã£ãŸã¨ã„ã†ã®ã‚‚ã‚ã‚Šãã†ã§ã™ã€‚

è¿½è¨˜ã—ã¾ã—ãŸã€‚

> ```
> * Enumerable and Enumerator
> o Enumerable::Enumerator, compatibility alias of Enumerator,
> is removed.
> 
> ```
> 
> aliasã¨ã‚ã£ã¦ã€Enumerable::Enumerator = Enumeratorã ã£ãŸã‹ã‚ˆã†ãª  
> å°è±¡ã‚’å—ã‘ã‚‹ã®ã§ã™ãŒã€å®Ÿéš›ã«ã¯ãã†ã§ã¯ãªã„ã§ã™ã€‚

“… is removed” ã§ã™ã€‚

---

<div class="post-metadata">

**Author:** ![akira\_yamada\_S\_SSB](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/46a35a/32.png) [@akira\_yamada\_S\_SSB](https://www.ruby-forum.com/u/akira_yamada_S_SSB)\
**Post date:** [January 30, 2009, 4:28pm UTC](https://www.ruby-forum.com/t/1-9-1-rc2-b-n-bnews-b-nfbmf-b/158904/5 "2009-01-30T16:28:10Z")

</div>

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:37862] Re: 1.9.1-rc2e$B$Ne(BNEWSe$B$NFbMFe(B”  
on Fri, 30 Jan 2009 16:37:17 +0900, “Akinori MUSHA”  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) writes:

|\> \* ife$B$J$I$G$Ne(Bthene$B$NBe$o$j$Ne(B:  
|  
|e$B$3$l$O$^$@$"$k$s$G$7$g$&$+!#e(B

1.9e$B$G$O$b$&$"$j$^$;$s!#e(B

|\> \* begine$B!Ae(Bende$B0J30$G$Ne(Bretrye$B$OGQ;\_e(B  
|\> \* evale$B$NBhFs0z?t$H$7$Fe(BProce$B%_%V%8%'%/%H$rEO$;$J$/$J$C$?e(B  
|  
|e$B$3$NJU$O0U?^$5$l$?;EMM!":G=_;EMM$J$s$G$7$g$&$+$M!#e(B

e$B$O$$!#e(B

---

<div class="post-metadata">

**Author:** ![akira\_yamada\_S\_SSB](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/46a35a/32.png) [@akira\_yamada\_S\_SSB](https://www.ruby-forum.com/u/akira_yamada_S_SSB)\
**Post date:** [January 30, 2009, 8:40am UTC](https://www.ruby-forum.com/t/1-9-1-rc2-b-n-bnews-b-nfbmf-b/158904/6 "2009-01-30T08:40:07Z")

</div>

At Thu, 29 Jan 2009 16:36:19 +0900,  
akira yamada / ã‚„ã¾ã ã‚ãã‚‰ wrote:

> - è¡Œé ­ã€Œ.ã€ã«ã‚ˆã‚‹è¡Œç¶™ç¶š
> - **ENCODING**
> - def !=ã€def !~ã€def !

ãã‚Œãžã‚Œè¿½åŠ ã—ã¾ã—ãŸã€‚

> - ifãªã©ã§ã®thenã®ä»£ã‚ã‚Šã®:

ã“ã‚Œã¯ã¾ã ã‚ã‚‹ã‚“ã§ã—ã‚‡ã†ã‹ã€‚

> - beginã€œendä»¥å¤–ã§ã®retryã¯å»ƒæ­¢
> - evalã®ç¬¬äºŒå¼•æ•°ã¨ã—ã¦Procã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’æ¸¡ã›ãªããªã£ãŸ

ã“ã®è¾ºã¯æ„å›³ã•ã‚ŒãŸä»•æ§˜ã€æœ€çµ‚ä»•æ§˜ãªã‚“ã§ã—ã‚‡ã†ã‹ã­ã€‚
