=1B$BNc$,J,$+$j$K$/$+$C$?$+$b$7$l$^$;$s!#=1B(B
String#to_s =1B$B$N:FDj5A$G$O$J$/!"=1B(BA#to_s=1B$B$rDj5A$7$F$$$^$9!#=1B(B

2017/08/14 4:05=1B$B!"=1B(BTakashi Kokubun <takashikkbn / gmail.com> =1B$B$N%a=
%C%;!<%8=1B(B:

> k0kubun=1B$B$G$9=1B(B
>=20
> =1B$B7P0^$d0U?^$K$D$$$F$O;d$OG'<1$7$F$$$^$;$s$,!"=1B(B
> =1B$BEO$5$l$?%*%V%8%'%/%H$N7?$,=1B(BString=1B$B$N>l9g$O$=3D$l$r$=3D$N$^$^;=
H$&$H$$$&5sF0$N$?$a!"=1B(B
> Refinements=1B$B$K8B$C$?OC$G$O$J$/!"%0%m!<%P%k$K=1B(BString#to_s=1B$B$r:FD=
j5A$7$F$b8F$P$l$J$$$H;W$$$^$9!#=1B(B
>=20
> =1B$B8D?ME*$K$O=1B(B String#to_s =1B$B$r>e=3Dq$-$7$?$$$3$H$,$J$$$N$G=1B(B
> =1B$B8eJ}8_49@-E*$K$b$=3D$N$^$^$N5sF0$G9=3D$o$J$$$N$G$9$,!"=1B(B
> =1B$B;d$b$3$N5sF0$r8+$?$H$-$O0l4S@-$,$J$$$h$&$K46$8$?$N$G=1B(B
> =1B$B$3$l$,0U?^E*$J$N$+$I$&$+$O7P0^$K>\$7$$J}$K$*J9$-$7$?$$$G$9!#=1B(B
>=20
> 2017=1B$BG/=1B(B8=1B$B7n=1B(B9=1B$BF|=1B(B 23:43 Tsukuru Tanimichi <ttanim=
ichi / ttanimichi.com>:
>> =1B$B$O$8$a$^$7$F!#C+F;$H?=3D$7$^$9!#=1B(B
>>=20
>> =1B$B4{=3DP$@$C$?$i$9$_$^$;$s!#=1B(Bbugs.ruby-lang.org =1B$B$G$b8!:w$7$?$=
s$G$9$,=1B(B
>> =1B$B$=3D$l$C$]$$%A%1%C%H$,8+Ev$?$i$J$+$C$?$N$G3NG'$5$;$F$/$@$5$$!#=1B(B
>>=20
>> Refinements =1B$B$GDj5A$7$?=1B(B to_s =1B$B$r=1B(B String interpolation =1B=
$B$,8F$s$G$/$l$J$$$N$G$9$,!"$3$l$C$F;EMM$J$s$G$9$+$M!)=1B(B
>> String literal =1B$B$NI>2A$,=1B(B using B =1B$B$7$F$$$k%9%3!<%W$N30$G9T$o=
$l$k!"$H$$$&$3$H$G$7$g$&$+!#=1B(B
>>=20
>> ```
>> $ ruby -v
>> ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]
>> ```
>>=20
>> ```ruby
>> class A
>> end
>>=20
>> module B
>>  refine A do
>>    def to_s
>>      'b'
>>    end
>>  end
>> end
>>=20
>> class C
>>  using B
>>=20
>>  def initialize
>>    @a =3D A.new
>>  end
>>=20
>>  def c1
>>    @a.to_s
>>  end
>>=20
>>  def c2
>>    "#{@a}"
>>  end
>>=20
>>  def c3
>>    puts "#{@a}"
>>  end
>> end
>>=20
>> puts C.new.c1 #=3D> b
>> puts C.new.c2 #=3D> #<A:0x007fb05ba3e928>
>> C.new.c3 #=3D> #<A:0x007fb05ba3e7e8>
>> ```
>>=20
>> c1, c2, c3 =1B$B$H$b$K=1B(B "b" =1B$B$H$J$k$3$H$rA[A|$7$F$$$^$7$?!#=1B(B
>>=20
>> --
>> =1B$BC+F;=1B(B =1B$BAO!J=1B(BTsukuru Tanimichi=1B$B!K=1B(B
>> https://ttanimichi.com/