| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
* io.c (io_close_fptr): notify then close, and wait for other
threads before free fptr. [ruby-core:79262] [Bug #13158]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows Warning.warn to filter/process warning messages
generated by Kernel#warn. Currently, Warning.warn can only handle
messages generated by the rb_warn/rb_warning C functions.
The Kernel#warn API is different than the Warning.warn API, this
tries to get similar behavior, but there are probably corner cases
where the behavior is different.
This makes str_end_with_asciichar in io.c no longer static so it
can be called from error.c.
[Feature #12944]
Author: Jeremy Evans <code@jeremyevans.net>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* io.c (io_fillbuf): fix race between read and close and bail out
in the case the IO gets closed before the reading thread achieve
the lock. [ruby-core:78845] [Bug #13076]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* io.c (io_fillbuf): revert a part of r57199 because it broke IO#getch.
see also [Bug #13076]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* io.c (argf_next_argv): fix leak of fd after breaking in #each
method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* io.c (io_fillbuf): fix race between read and close, in the case
the IO gets closed before the reading thread achieve the lock.
[ruby-core:78845] [Bug #13076]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
As of Ruby 2.3, IO#close no longer raises IOError if the file is already
closed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* io.c (argf_rewind): rewind line number in non-global ARGF
instance.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* io.c (argf_block_call_line): update line number in non-global
ARGF instance. [ruby-core:78728] [Bug #13051]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* io.c (extract_getline_opts): extract chomp option.
[Feature #12553]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
* numeric.c: [DOC] update document for Integer class.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
* dir.c (dir_initialize, dir_read): prefer rb_syserr_fail over
rb_sys_fail.
* io.c (ruby_dup, rb_sysopen): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* io.c (copy_stream_body): use IO to write to copy to duplex IO.
http://twitter.com/knu/status/786505317974585344
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* io.c (prep_io): fix typo of struct member name.
[ruby-core:77550] [Bug #12829]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* io.c (prep_io): reduce isatty call (and its system call) on
Cygwin.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
* io.c (fptr_finalize): use dedicated macro RB_INTEGER_TYPE_P.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
[fix GH-1429][ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* io.c (rb_file_initialize): check if fd is an Integer but not a
Fixnum.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
fd is associated to non-disk device. if call fsync and/or fdatasync
with such fds, it causes Errno::EBADF exception and the behavior is
incomatible with ruby 2.1 and earlier unintendedly introduced.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* *.c: rename rb_funcall2 to rb_funcallv, except for extensions
which are/will be/may be gems. [Fix GH-1406]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
of IO.read.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* io.c (rb_io_s_foreach, rb_io_s_readlines): convert arguments
just once before reading, instead of conversions for each lines.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
more than two decades ago. [fix GH-1350] Patch by @cremno
* include/ruby/ruby.h: ditto.
* io.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* io.c (Init_IO): [DOC] define dummy ARGF instead of ARGF.class to
re-enable the generation of ARGF documentation. [Fix GH-1358]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* process.c (rb_execarg_commandline): build command line string
from argument vector in rb_execarg.
[ruby-core:75611] [Bug #12398]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
* io.c (pipe_atexit): only used on Windows
* io.c (rb_execarg_fixup_v): wrapper only used fork or spawnv is
available.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* io.c (do_io_advise): use configured PRI_OFFT_PREFIX instead of
PRI_OFF_T_PREFIX to format off_t properly on Cygwin.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* io.c (rb_io_set_encoding): remove extra declarations,
rb_std{in,out,err} are defined in this file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* io.c (rb_obj_display): [DOC] fix output of Array, as Array#to_s
is same as Array#inspect since 1.9.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
| |
* io.c (rb_io_gets_internal): read one line from an IO without
setting ARGF.lineno.
* parse.y (lex_io_gets): use rb_io_gets_internal not to affect
$. global variable.
* ruby.c (load_file): no longer reset $.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
| |
* io.c (rb_io_open_generic): split from rb_io_open without
argument conversions.
* io.c (rb_io_s_binread): get rid of unnecessary object creation
and conversion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* io.c (rb_file_open_generic, pipe_open, pipe_open_s): constify
convconfig parameter.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
* io.c (rb_update_max_fd): get rid of unused-value warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was made obsolete by r4190 back in July 2003. Furthermore,
this existed less than 3 months as it was only introduced in
r3782.
So with absolutely no references to rb_deferr, I doubt any vim
plugin would care anymore.
ChangeLog: fixup indent of my previous commit, oops :X
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
| |
Sometimes a sleepy developer will want to swap read_nonblock
for readpartial forget to remove "exception: false"
* io.c (io_getpartial): remove unused kwarg from template
* test/ruby/test_io.rb (test_readpartial_bad_args): new
[Bug #11885]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* io.c (rb_readwrite_syserr_fail): works with the given errno than
thread local errno.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* file.c, io.c, util.c: prefer rb_syserr_fail with saved errno
over setting errno then call rb_sys_fail, not to be clobbered
potentially and to reduce thread local errno accesses.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ci skip][fix GH-1140] Patch by @jutaz
* io.c: ditto.
* iseq.c: ditto.
* numeric.c: ditto.
* process.c: ditto.
* string.c: ditto.
* vm_trace.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ci skip][fix GH-1140] Patch by @jutaz
* dir.c: ditto.
* gc.c: ditto.
* io.c: ditto.
* node.h: ditto.
* thread_pthread.c: ditto.
* vm_insnhelper.c: ditto.
* vsnprintf.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* io.c (parse_mode_enc): preserve encoding of mode string in
warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* io.c (io_encname_bom_p): check BOM prefix only, not including
UTF prefix.
* io.c (parse_mode_enc): warn BOM with non-UTF encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
* io.c (parse_mode_enc): fix buffer overflow.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As it is just a hint the kernel is free to ignore,
IO#advise already succeeds when posix_fadvise is not
available build time at all. Following that, if posix_fadvise
was available at build time but not implemented in the running
kernel, we should also ignore it.
* io.c (do_io_advise): do not raise on ENOSYS
* test/ruby/test_io.rb (test_advise): do not skip on Errno::ENOSYS
(test_advise_pipe): ditto
[ruby-core:72066] [Feature #11806]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
* dir.c (dir_initialize): rb_id_encoding() returns same ID with
caching.
* io.c (Init_IO): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
| |
NULL checking is finished Before call of memsize functions.
See r52979.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* io.c (copy_stream_body): try to_io conversion before read,
readpartial, and write methods. [ruby-dev:49008] [Bug #11199]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
argument is not given.
[ruby-core:71668] [Bug #11738]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* beos: Drop support for BeOS now that Haiku is stable.
[Fix GH-1112]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|