aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* adjust stylenobu2012-11-064-10/+20
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix typos in commentsshirosaki2012-11-062-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove FIXME skip on Windows testluislavena2012-11-062-1/+5
| | | | | | | * test/ruby/test_file_exhaustive.rb: Remove FIXME skip on Windows specific test because the test in question was already fixed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Recognize zlibwapi as linking libraryluislavena2012-11-062-1/+8
| | | | | | | | | * ext/zlib/extconf.rb: Recognize zlibwapi as linking library. Patch by Daniel Berger. [ruby-core:44979] [Feature #6421] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * NEWS: Update for lazy size evaluation [Feature #6636]marcandre2012-11-062-0/+38
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator.c: Support for lazy.cycle.sizemarcandre2012-11-064-2/+19
| | | | | | [Feature #6636] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator.c: Add support for lazy.drop.sizemarcandre2012-11-062-1/+19
| | | | | | [Feature #6636] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator.c: Support for lazy.take.sizemarcandre2012-11-062-1/+15
| | | | | | [Feature #6636] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator.c: Support for lazy.{map|flat_map|...}.sizemarcandre2012-11-062-12/+22
| | | | | | [Feature #6636] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator.c: Support for lazy.sizemarcandre2012-11-062-2/+27
| | | | | | [Feature #6636] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c: Support for String#{each_byte,each_char,each_codepoint}.sizemarcandre2012-11-062-3/+28
| | | | | | [Feature #6636] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (int_dotimes): Support for Integer#times.sizemarcandre2012-11-062-1/+14
| | | | | | [Feature #6636] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (int_upto, int_downto): Support for Integer#{down|up}to.sizemarcandre2012-11-062-2/+18
| | | | | | [Feature #6636] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * range.c: Support for range.step.sizemarcandre2012-11-062-1/+30
| | | | | | [Feature #6636] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * range.c: Support for Range#size and Range#each.sizemarcandre2012-11-062-1/+29
| | | | | | [Feature #6636] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (num_step): Support for Numeric#step.sizemarcandre2012-11-063-2/+56
| | | | | | [Feature #6636] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c: Extract ruby_float_step_sizemarcandre2012-11-061-24/+28
| | | | | | [Feature #6636] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * struct.c: Support for Struct's enumerators #sizemarcandre2012-11-062-3/+13
| | | | | | [Feature #6636] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * hash.c: Support for enumerators created by ENV:marcandre2012-11-062-8/+32
| | | | | | | each, each_value, ... [Feature #6636] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * hash.c: Support for enumerators created by Hash:marcandre2012-11-062-8/+17
| | | | | | | delete_if, reject!, ... [Feature #6636] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (enum_cycle): Support for Enumerable#cycle.sizemarcandre2012-11-062-1/+24
| | | | | | [Feature #6636] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (enum_each_cons): Support for Enumerable#each_cons.sizemarcandre2012-11-062-1/+22
| | | | | | [Feature #6636] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (enum_each_slice): Support for Enumerable#each_slice.sizemarcandre2012-11-062-1/+29
| | | | | | [Feature #6636] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c: Support for enumerators created by Enumerable with forwarding:marcandre2012-11-062-14/+36
| | | | | | | find_all, reject, ... [Feature #6636] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_eval.c (rb_f_loop): Support for loop.sizemarcandre2012-11-062-1/+10
| | | | | | [Feature #6636] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_cycle): Support for Array#cycle.sizemarcandre2012-11-062-1/+23
| | | | | | [Feature #6636] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_repeated_combination): Support for repeated_combination.sizemarcandre2012-11-062-1/+17
| | | | | | [Feature #6636] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_repeated_permutation): Support for repeated_permutation.sizemarcandre2012-11-062-2/+20
| | | | | | [Feature #6636] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_combination): Support for Array#combination.sizemarcandre2012-11-062-2/+32
| | | | | | [Feature #6636] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_permutation): Support for Array#permutation.sizemarcandre2012-11-062-1/+37
| | | | | | [Feature #6636] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c: Support for Enumerator#size in trivial cases:marcandre2012-11-062-12/+21
| | | | | | | | each, each_index, reverse_each, sort_by, collect, collect!, select, select!, keep_if, reject, reject!, delete_if [Feature #6636] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator.c: Support #size for enumerators created from enumeratorsmarcandre2012-11-062-2/+11
| | | | | | [Feature #6636] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator.c (obj_to_enum): Have #to_enum accept a blockmarcandre2012-11-062-2/+14
| | | | | | [Feature #6636] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator: New method #size; constructor accepts sizemarcandre2012-11-063-14/+74
| | | | | | | | | [Feature #6636] * include/ruby/intern.h: RETURN_SIZED_ENUMERATOR for support of sized enumerators git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2012-11-07svn2012-11-061-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator.c (enumerator_initialize): Warn when using deprecated formmarcandre2012-11-062-1/+5
| | | | | | [Feature #6636] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (rb_mod_const_get): Fix constant missing exception classtenderlove2012-11-063-1/+43
| | | | | | | | | and message to maintain backwards compatibility. Constant search should start at Object when constant starts with '::' * test/ruby/test_module.rb: test for fixes git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ChangeLog: add link to redmine and ruby-coreglass2012-11-061-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/tempfile.rb: fix confusing inspect.glass2012-11-062-0/+18
| | | | | | | | | | | | | | | previous Tempfile#inspect says it is a File, but actually it is not a File. t = Tempfile.new("foo") #=> #<File:/tmp/foo20121106-31970-1ffbum0> t.is_a? File #=> false now Tempfile#inspect returns like: t = Tempfile.new("foo") #=> #<Tempfile:/tmp/foo20121106-31970-1ffbum0> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * atomic.h: add #include <sys/atomic.h> for the workaround ofngoto2012-11-062-0/+7
| | | | | | | | header file name conflict of atomic.h with /usr/include/atomic.h on Solaris 10. [ruby-dev:46414] [Bug #7287] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/win32ole/test_win32ole.rb: follow other test files.usa2012-11-061-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/win32ole/test_win32ole.rb: now source encoding is UTF-8, sousa2012-11-062-1/+6
| | | | | | | binary strings in old scripts are dangerous. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * properties.nobu2012-11-060-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/protocol.rb (Net::InternetMessageIO#each_crlf_line):naruse2012-11-063-1/+17
| | | | | | don't use /n in universal regexp. [ruby-dev:46394] [Bug #7278] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_b): Add String#b, returning a copied stringnaruse2012-11-064-2/+45
| | | | | | whose encoding is ASCII-8BIT. [ruby-dev:45992] [Feature #6767] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (load_file_internal): set default source encoding asnaruse2012-11-0624-6/+32
| | | | | | | | | UTF-8 instead of US-ASCII. [ruby-core:46021] [Feature #6679] * parse.y (parser_initialize): set default parser encoding as UTF-8 instead of US-ASCII. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_require.rbshirosaki2012-11-052-2/+9
| | | | | | | | (TestRequire#test_require_to_path_redefined_in_load_path, TestRequire#test_require_to_str_redefined_in_load_path): Suppress method redefined warning when test-all with RUBYOPT=-w. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread_pthread.c (rb_reserved_fd_p): fix typo in macro checkkosaki2012-11-052-1/+7
| | | | | | | | | that prevented the ifdef ever being true. [Bug #7281] [ruby-core:48940] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix compatibility of cached expanded load pathshirosaki2012-11-057-13/+276
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * file.c (rb_get_path_check_to_string): extract from rb_get_path_check(). We change the spec not to call to_path of String object. * file.c (rb_get_path_check_convert): extract from rb_get_path_check(). * file.c (rb_get_path_check): follow the above change. * file.c (rb_file_expand_path_fast): remove check_expand_path_args(). Instead we call it in load.c. * file.c (rb_find_file_ext_safe): use rb_get_expanded_load_path() to reduce expand cost. * file.c (rb_find_file_safe): ditto. * internal.h (rb_get_expanded_load_path): add a declaration. * internal.h (rb_get_path_check_to_string, rb_get_path_check_convert): add declarations. * load.c (rb_construct_expanded_load_path): fix for compatibility. Same checks in rb_get_path_check() are added. We don't replace $LOAD_PATH and ensure that String object of $LOAD_PATH are frozen. We don't freeze non String object and expand it every times. We add arguments for expanding load path partially and checking if load path have relative paths or non String objects. * load.c (load_path_getcwd): get current working directory for checking if it's changed when getting load path. * load.c (rb_get_expanded_load_path): fix for rebuilding cache properly. We check if current working directory is changed and rebuild expanded load path cache. We expand paths which start with ~ (User HOME) and non String objects every times for compatibility. We make this accessible from other source files. * load.c (rb_feature_provided): call rb_get_path() since we changed rb_file_expand_path_fast() not to call it. * load.c (Init_load): initialize vm->load_path_check_cache. * vm.c (rb_vm_mark): mark vm->load_path_check_cache for GC. * vm_core.h (rb_vm_struct): add vm->load_path_check_cache to store data to check load path cache validity. * test/ruby/test_require.rb (TestRequire): add tests for require compatibility related to cached expanded load path. [ruby-core:47970] [Bug #7158] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Cache the expanded load pathshirosaki2012-11-055-8/+54
| | | | | | | | | | | | | | | | | | | | | | * load.c (rb_get_expanded_load_path): cache the expanded load path. This saves 4KB of allocation and some stats for every element of the load path (so nearly a MB in my Rails app) on every require. * load.c (rb_construct_expanded_load_path): ensure that $LOAD_PATH entries are frozen strings. The user must mutate $LOAD_PATH itself rather than its individual entries. * vm_core.h (rb_vm_struct): add fields. * vm.c (rb_vm_mark): mark new fields. * ruby.c (process_options): modify $LOAD_PATH directly rather than its elements. Patch by Greg Price. [ruby-core:47970] [Bug #7158] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e