Successfully reported this slideshow.

Ruby 1.9.3 の新機能と変更点

19

Share

Upcoming SlideShare
Ruby の懸案事項
Ruby の懸案事項
Loading in …3
×
1 of 65
1 of 65

Ruby 1.9.3 の新機能と変更点

19

Share

Download to read offline

Ruby 1.9.3 の新機能と変更点について、2011年7月2日時点での NEWS をベースに解説しました。

Ruby 1.9.3 の新機能と変更点について、2011年7月2日時点での NEWS をベースに解説しました。

More Related Content

Related Books

Free with a 14 day trial from Scribd

See all

Related Audiobooks

Free with a 14 day trial from Scribd

See all

Ruby 1.9.3 の新機能と変更点

  1. 1. Ruby 1.9.3 Kenta Murata 2011 7 3 1
  2. 2. 2011 7 3 2
  3. 3. 2011 2010 7 3 3 1 3
  4. 4. Ruby 1.9.3 Kenta Murata 2011 7 3 4
  5. 5. • ruby NEWS ( ) 2011 7 3 5
  6. 6. • NEWS • ruby_1_9_3 NEWS 2011 7 3 6
  7. 7. ! W NE ARGF.read_nonblock • ARGF.read_nonblock(maxlen) • ARGF.read_nonblock(maxlen, outbuf) 2011 7 3 7
  8. 8. ! W NE ARGF.to_write_io • IO • IOError 2011 7 3 8
  9. 9. ! W NE ARGF.write • ARGF.write(str) • str ARGF.to_write_io.write(str) 2011 7 3 9
  10. 10. ! W NE ARGF • ARGF.print • ARGF.printf • ARGF.putc • ARGF.puts • IO ARGF.write 2011 7 3 10
  11. 11. ! Array#pack, W NE String#unpack • ‘<’ ‘>’ S>, L>, Q>, s>, l>, q>, ‘>’ S!>, L!>, Q!>, s!>, l!>, q!> S<, L<, Q<, s<, l<, q<, ‘<’ S!<, L!<, Q!<, s!<, l!<, q!< 2011 7 3 11
  12. 12. ! ed ov pr Bignum Im • 1,500 ( 150 ) (Toom-3) 2011 7 3 12
  13. 13. ! W NE • CP950 (Big5) • CP951 (BIg5HKSCS) • UTF-16 • UTF-32 2011 7 3 13
  14. 14. ! ed ng a Ch • SJIS Windows-31J • 1.9.2 Shift_JIS 2011 7 3 14
  15. 15. ! W NE File::NULL • NULL • UNIX “/dev/null” • Windows “NUL” 2011 7 3 15
  16. 16. ! ed ov pr IO#putc Im • • putc “ ” ! 2011 7 3 16
  17. 17. ! W NE IO#advise • IO#advise(advise, offset=0, len=0) • posix_fadvise(2) OS • posix_fadvise(2) 2011 7 3 17
  18. 18. ! W NE IO.write • IO.write(name, string, offset=0, opts={}) • name string offset opts • IO.read 2011 7 3 18
  19. 19. ! W NE IO.binwrite • IO.binwrite(name, string, offset=0, opts={}) • IO.write • “wb:ASCII-8BIT” 2011 7 3 19
  20. 20. ! ed ng BasicObject#__id__ a Ch • Object BasicObject • [ruby-dev:42778] 2011 7 3 20
  21. 21. ! ed Kernel#rand, ov pr Im Random.rand • Kernel#rand(range) • Random.rand(range) • OK • [ruby-dev:43427], #4605 2011 7 3 21
  22. 22. ! W Module#private_constant, NE Module#public_constant • • 2011 7 3 22
  23. 23. ! W NE String#prepend • String#prepend(str) • str • recv[0,0] = str ( ) 2011 7 3 23
  24. 24. ! W NE String#byteslice • String#byteslice(n) • String#byteslice(beg, end) • String#slice • 2011 7 3 24
  25. 25. ! ed ov pr Time#strftime Im • • %:z %H:%M • %::z %H:%M:%S 2011 7 3 25
  26. 26. ! Process#maxgroups, W NE Process#maxgroups • 2011 7 3 26
  27. 27. ! ed ov BigDecimal.new, pr Im Kernel#BigDecimal • Integer Rational Float • Rational Float 2 2011 7 3 27
  28. 28. ! ed ov pr BigDecimal#coerce Im • Rational BigDecimal coerce BigDecimal • 1.9.2 Rational Float 2011 7 3 28
  29. 29. ! ed BigMath.exp, ng a Ch BigMath.log • bigdecimal/math bigdecimal •C 2011 7 3 29
  30. 30. ! ed ov pr BigDecimal#** Im • BigDecimal ( ) 2011 7 3 30
  31. 31. ! ed ov pr DateTime Im • DateTime.new Float Rational • 2011 7 3 31
  32. 32. ! ed ov DateTime#+, pr Im DateTime#- • DateTime Float • Float 2011 7 3 32
  33. 33. date • • strftime (Time#strftime ) • inspect • marshal 2011 7 3 33
  34. 34. ! W NE io/console • IO#noecho {|io} ... } • IO#echo= • IO#echo? • IO#raw {|io| ... } • IO#raw! • IO#getch • IO#winsize • IO.console 2011 7 3 34
  35. 35. ! W NE Matrix • Matrix#diagnoal? -- • Matrix#hermitian? -- • Matrix#normal? -- • Matrix#orthogonal? -- • Matrix#permutation? -- • Matrix#symmetric? -- • Matrix#unitary? -- • Matrix#zero? -- 2011 7 3 35
  36. 36. ! Matrix#eigen, W NE Matrix#eigensystem • • v, d, v_inv = matrix.eigen • v, v_inv : • d: • (v * d * v_inv).round(5) == matrix 2011 7 3 36
  37. 37. ! W Matrix#lup NE Matrix#lup_decomposition • LUP • l, u, p = matrix.lup 2011 7 3 37
  38. 38. ! W NE Matrix#round • Matrix#round(n=0) • n 2011 7 3 38
  39. 39. ! W NE Vector#magnitude • 2011 7 3 39
  40. 40. Matrix#each, Matrix#each_with_index • Matrix#each(mode=:all) • each :all :diagonal :off_diagonal :lower :strict_lower :strict_upper :upper 2011 7 3 40
  41. 41. :all   0 0 0 0 0 0 0 0 0 0  0 0 0 0 0  0 0 0 0 0 0 0 0 0 0 2011 7 3 41
  42. 42. :diagonal   0 0 0 0 0 0 0 0 0 0  0 0 0 0 0  0 0 0 0 0 0 0 0 0 0 2011 7 3 42
  43. 43. :off_diagonal   0 0 0 0 0 0 0 0 0 0  0 0 0 0 0  0 0 0 0 0 0 0 0 0 0 2011 7 3 43
  44. 44. :lower   0 0 0 0 0 0 0 0 0 0  0 0 0 0 0  0 0 0 0 0 0 0 0 0 0 2011 7 3 44
  45. 45. :strict_lower   0 0 0 0 0 0 0 0 0 0  0 0 0 0 0  0 0 0 0 0 0 0 0 0 0 2011 7 3 45
  46. 46. :strict_upper   0 0 0 0 0 0 0 0 0 0  0 0 0 0 0  0 0 0 0 0 0 0 0 0 0 2011 7 3 46
  47. 47. :upper   0 0 0 0 0 0 0 0 0 0  0 0 0 0 0  0 0 0 0 0 0 0 0 0 0 2011 7 3 47
  48. 48. ! ed Matrix#find_index, ov pr Im Matrix#index • Matrix#index(val, selector=:all) • val [row, column] • Matrix#index(selector=:all) {|val| ... } • • Matrix#index(selector=:all) • Enumerator 2011 7 3 48
  49. 49. ! ed ov pr Matrix.zero Im • Matrix.zero(row_size, col_size=row_size) • 2011 7 3 49
  50. 50. ! ed ov pr net/http Im • Server Name Indication ( ) • 100 continue ( ) • Net::HTTPRequest#set_form application/x-www-form-urlencoded multipart/form-data 2011 7 3 50
  51. 51. ! ed ov pr webrick Im • WEBrick::HTTPRequest#continue 100 continue • “%{remote}p” 2011 7 3 51
  52. 52. ! ed ov pr openssl Im • 2011 7 3 52
  53. 53. ! ed ov pr optparse Im • bash zsh l 2011 7 3 53
  54. 54. ! ed ov pr Rake Im • 0.9.2.1 • 1.9.2 0.8.7 2011 7 3 54
  55. 55. ! ed ov pr RDoc Im • 3.8 • 1.9.2 2.5.8 2011 7 3 55
  56. 56. ! ed ov pr rexml Im • iconv Ruby • Document#encoding XMLDecl#encoding Output#encoding Source#encoding Encoding 2011 7 3 56
  57. 57. ! ed ov pr Rubygems Im • 1.5.0 2011 7 3 57
  58. 58. ! ed ov pr stringio Im • StringIO#set_encoding (IO#set_encoding ) • 2011 7 3 58
  59. 59. ! ed ov pr test/unit Im • • 2011 7 3 59
  60. 60. ! ed ov pr uri Im • URI::Generic#hostname URI::Generic#hostname= 2011 7 3 60
  61. 61. ! ed ng yaml a Ch • YAML Psych • syck : YAML::ENGINE.yamler = ‘syck’ 2011 7 3 61
  62. 62. ! ed ov pr zlib Im • Zlib::Deflate.deflate Zlib.deflate • Zlib::Inflate.inflate Zlib.inflate 2011 7 3 62
  63. 63. ! ed ov pr fileutils Im • FileUtils.chmod chmod(1) • : FileUtils.chmod “u=wrx,go=rx”, filename 2011 7 3 63
  64. 64. ! ed ov pr Im • Regexp Unicode 6.0 • Regexp Unicode Age • warn-indent: true ) -*- warn-indent: true -*- ) -*- warn-indent: false -*- 2011 7 3 64
  65. 65. • NEWS • Ruby 1.9.3 2011 7 3 65

×