
1: Changes for 1.9 2: 3: Incompatible (Severe) 4: 5: * New syntax and semantics 6: o Block arguments are always local 7: o Block arguments 8: o New semantics for block arguments 9: o Block local variables 10: * String 11: o No longer an Enumerable 12: o ?c semantics 13: o "One-char-wide" semantics for String#[] and String#[]= [Ruby2] 14: o Encoding-awareness 15: * IO operations 16: o IO#getc 17: 18: Incompatible (Trivial) 19: 20: * New syntax and semantics 21: o Method used for splat arguments: #to_splat 22: o defined? and local variables 23: * Kernel and Object 24: o Kernel#require 25: * Class and Module 26: o Class variables behavior 27: o Module#attr is an alias of attr_reader 28: o Module#instance_methods, #private_instance_methods, #public_instance_methods 29: o Extra subclassing check when binding UnboundMethods 30: * Exceptions 31: o Equality of exceptions 32: o SystemStackError 33: o SecurityError 34: o Removed Exception#to_str [Ruby2] 35: * Array 36: o Array#nitems 37: o Array#[m,n] = nil places nil in the array. 38: * Hash 39: o Hash#to_s is equivalent to Hash#inspect 40: o Semantics for Hash#each and Hash#each_pair 41: o Hash#select 42: * Integer 43: o Integer(nil) raises TypeError 44: * Struct 45: o Struct#inspect 46: * File and Dir operations 47: o #to_path in File.path, File.chmod, File.lchmod, File.chown, File.lchown, File.utime, File.unlink... [Ruby2] 48: o Dir.[], Dir.glob 49: o Dir.exist? 50: * IO operations 51: o Non-blocking IO 52: o IO#getbyte, IO#readbyte, StringIO#getbyte, StringIO#readbyte 53: o Kernel#open takes encoding specified 54: o IO#initialize now accepts an IO argument 55: o StringIO#readpartial 56: o IO#lines 57: o IO#bytes 58: o IO.try_convert 59: o Limit input in IO#gets, IO#readline, IO#readlines, IO#each_line, IO#lines, IO.foreach, IO.readlines, StringIO#gets, StringIO#readline, StringIO#each, StringIO#readlines 60: o IO#ungetc, StringIO#ungetc 61: o IO#internal_encoding, IO#external_encoding, IO#set_encoding 62: o IO.pipe takes encoding option 63: * Time 64: o New format in Time#to_s 65: o Timezone information preserved on Marshal.dump/load 66: * Symbols: restriction on literal symbols 67: * $SAFE and bound methods 68: * Deprecation 69: o VERSION and friends 70: o Kernel.to_a 71: o Kernel#getc 72: o Object#type 73: o Hash#index 74: o ENV.index 75: o Symbol#to_int 76: o Removed Array and Hash #indices, #indexes 77: o libraries: base64, mailread, getopts, parsearg, soap, wsdl 78: 79: Compatible 80: 81: * New syntax and semantics 82: o New literal hash syntax 83: o New syntax for lambdas 84: o .() and calling Procs without #call/#[] 85: o Mandatory arguments after optional arguments allowed 86: o Multiple splats allowed 87: o Arguments to #[] 88: o printf-style formatted strings (%) 89: o Newlines allowed before ternary colon 90: * Kernel and Object 91: o BasicObject 92: o #instance_exec 93: o Object#=~ 94: o Object#tap 95: o Kernel#instance_variable_defined? 96: o Kernel#define_singleton_method 97: o Kernel#singleton_methods, Kernel#methods 98: * Class and Module 99: o Module#const_defined?, #const_get and #method_defined? 100: o Module#class_variable_defined? 101: o #class_variable_{set,get} 102: o Class of singleton classes 103: o #module_exec 104: * Binding#eval 105: * Blocks and Procs 106: o Arity of blocks without arguments 107: o proc is now a synonym of Proc.new 108: * Blocks and Procs 109: o Proc#yield 110: o Passing blocks to #[] 111: o Proc#lambda? 112: * Enumerable and Enumerator 113: o Enumerable methods called without a block 114: o Enumerable#cycle 115: o Enumerable#each_with_index 116: o Enumerable#first(n) 117: o Enumerable#group_by 118: o Enumerable#find_index 119: o Enumerable#take 120: o Enumerable#drop 121: o Enumerable#take_while 122: o Enumerable#drop_while 123: o Enumerator#each 124: o Enumerable#inject (#reduce) without a block 125: o Enumerable#count 126: o Enumerable#reduce 127: o Enumerator#with_index 128: o Enumerable##min_by, #max_by 129: o Enumerable#zip 130: o Enumerable#minmax and minmax_by 131: o Enumerator#rewind 132: o Enumerator#next 133: * Regexp#match, String#match 134: o Regexp#match, String#match 135: * Fiber: coroutines/micro-threads 136: * Array 137: o Block argument to Array#index, Array#rindex [Ruby2] 138: o Array#combination 139: o Array#permutation 140: o Array#product 141: o Array#pop, Array#shift 142: o Array#to_s is equivalent to Array#inspect 143: o Array.try_convert 144: * Hash 145: o preserving item insertion order 146: o Hash#_compare_by_identity and Hash#compare_by_identity? 147: o Hash.try_convert 148: * Integer 149: o Integer#odd?, #even? 150: o Integer#pred 151: * Method 152: o Method#receiver 153: o Method#name 154: o Method#owner 155: * Numeric 156: o Numeric#upto, #downto, #times, #step 157: o Numeric#scalar?, Complex#scalar? 158: o Numeric#div 159: o Numeric#fdiv 160: * Range 161: o Range#cover? 162: o Range#include? 163: o Range#min, Range#max 164: * Regexp 165: o Regexp#=== matches symbols 166: o Regexp.try_convert 167: * String 168: o String#clear 169: o String#each_char 170: o String#ord 171: o String#partition, #rpartition 172: o String#lines 173: o String#bytes 174: o String#encoding 175: o String#force_encoding 176: o String#start_with?, #end_with? 177: o String#unpack with a block 178: o String#hash 179: o String#upto 180: o String.try_convert 181: o String.encoding, String#force_encoding, String#encode 182: * Symbol 183: o Zero-length symbols allowed 184: o Symbol#=== matches strings 185: o Symbol#intern 186: o Symbol#encoding 187: o Symbol methods similar to those in String 188: * Math 189: o Math#log and Math#log2 190: * File and Dir operations 191: o New methods 192: * Process 193: o Process.setrlimit 194: o Process.daemon 195: o Process.exec 196: * Misc. new methods 197: o public_send 198: o GC.stress, GC.stress= 199: o Method#hash, Proc#hash 200: o __method__ and __callee__ 201: o Symbol#to_proc 202: 203: * Implementation 204: * Memory Diet 205: * Object Compaction - Object, Array, String, Hash, Struct, Class, Module 206: * st_table compaction (inlining small tables) 207: * YARV