aboutsummaryrefslogtreecommitdiffstats
path: root/lib/yaml.rb
Commit message (Collapse)AuthorAgeFilesLines
* Update the canonical repository urlHiroshi SHIBATA2019-08-191-2/+2
|
* Clarify the documentation of the YAML module [Misc #14567]eregon2018-03-021-3/+4
| | | | | | Based on a patch from Victor Shepelev git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add uplevel keyword to Kernel#warn and use itshyouhei2017-12-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If uplevel keyword is given, the warning message is prepended with caller file and line information and the string "warning: ". The use of the uplevel keyword makes Kernel#warn format output similar to how rb_warn formats output. This patch modifies net/ftp and net/imap to use Kernel#warn instead of $stderr.puts or $stderr.printf, since they are used for printing warnings. This makes lib/cgi/core and tempfile use $stderr.puts instead of warn for debug logging, since they are used for debug printing and not for warning. This does not modify bundler, rubygems, or rdoc, as those are maintained outside of ruby and probably wish to remain backwards compatible with older ruby versions. rb_warn_m code is originally from nobu, but I've changed it so that it only includes the path and lineno from uplevel (not the method), and also prepends the string "warning: ", to make it more similar to rb_warn. From: Jeremy Evans code@jeremyevans.net Signed-off-by: Urabe Shyouhei shyouhei@ruby-lang.org git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add frozen_string_literal: false for all filesnaruse2015-12-161-0/+1
| | | | | | When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/yaml.rb: fix typo. [ci skip][fix GH-890]hsbt2015-05-031-1/+1
| | | | | | Patch by @miketheman git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert "Revert "* lib/yaml.rb: Remove Psych::EngineManager [Bug #8344]""hsbt2014-06-261-34/+0
| | | | | | | | syck-1.0.3 gem support this imcompatible changes. This reverts commit r46102 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert "* lib/yaml.rb: Remove Psych::EngineManager [Bug #8344]"naruse2014-05-251-0/+34
| | | | | | | zzak is not the maintainer of yaml. This reverts commit r46097. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/yaml.rb: Remove Psych::EngineManager [Bug #8344]zzak2014-05-251-34/+0
| | | | | | | * test/psych/*: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/yaml.rb: [DOC] Add links to syck and psych on github [Bug #9501]zzak2014-02-081-1/+5
| | | | | | | Based on a patch by Giorgos Tsiftsis [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/yaml.rb, lib/yaml/: [DOC] Document YAML::DBM#key and addzzak2013-08-121-1/+1
| | | | | | | | references to similar methods with more detail. This patch brings lib/yaml to 100% documentation coverage. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cgi.rb: [DOC] Capitalize "Ruby" in documentation [Fixes GH-341]zzak2013-07-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | Patch by Dave Worth https://github.com/ruby/ruby/pull/341 * lib/webrick.rb: ditto * lib/scanf.rb: ditto * lib/xmlrpc/config.rb: ditto * lib/resolv.rb: ditto * lib/e2mmap.rb: ditto * lib/fileutils.rb: ditto * lib/mkmf.rb: ditto * lib/cgi/session.rb: ditto * lib/yaml.rb: ditto * lib/erb.rb: ditto * lib/irb.rb: ditto * lib/tracer.rb: ditto * lib/net/http.rb: ditto * ext/syslog/lib/syslog/logger.rb: ditto * sample/pty/expect_sample.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/yaml.rb: nodoc EngineManager, add History doc #8344zzak2013-05-021-5/+20
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/yaml.rb: Clarify documentation about YAML being always Psych.eregon2013-04-281-22/+11
| | | | | | Give a tip about using Syck. See #8344. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/yaml.rb: Use another trick to define the YAML module.eregon2013-04-281-2/+4
| | | | | | https://twitter.com/n0kada/status/328342207511801856 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/yaml.rb: Disable setting YAML const twice [ruby-core:54642]zzak2013-04-281-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/yaml.rb: add security warning to YAML documentationcharliesome2013-04-271-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/yaml.rb: Documentation for YAML module [Bug #8213]zzak2013-04-271-1/+24
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/yaml.rb (YAML::EngineManager): Documentation for #yamler andzzak2013-02-031-3/+17
| | | | | | | #yamler= for using the removed Syck gem as the YAML::ENGINE git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/syck: removed. Fixes [ruby-core:43360]tenderlove2012-08-221-54/+20
| | | | | | | | | * test/syck: removed. * lib/yaml.rb: only require psych, show a warning if people try to set the engine to syck. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/yaml.rb: explicitly specify ::Object to avoid the collision withnaruse2011-09-071-1/+1
| | | | | | Syck::Object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/yaml.rb: Document toplevel YAML and YAML::ENGINE to describedrbrain2011-06-301-0/+18
| | | | | | | Psych vs Syck engines. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/yaml.rb: load psych only when syck is not loaded.naruse2011-06-131-9/+16
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/yaml.rb: switch default YAML engine to Psych, old syck enginetenderlove2011-05-231-0/+8
| | | | | | may be enabled via YAML::ENGINE.yamler = "syck". [ruby-core:36374] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/yaml.rb: use Psych if only it is loaded already.nobu2010-04-081-1/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/yaml.rb (YAML::EngineManager#yamler): set the result afternobu2010-04-081-1/+2
| | | | | | successfully switched. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/yaml: Moved to ext/syck/lib, Syck only uses Syck constant.tenderlove2010-04-031-445/+25
| | | | | | | * lib/yaml.rb: Added an engine manager for choosing YAML engine. * ext/syck/lib/syck/rubytypes.rb: squashed warnings when using Psych git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/yaml.rb: adding deprecation notices to YAML methodstenderlove2010-03-261-4/+28
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/syck/rubyext.c (id_hash_new): new function to create a hashakr2009-08-221-4/+0
| | | | | | | | | | | | | | which key is compared by object id. (syck_parser_load): use id_hash_new for bonus->data. (syck_parser_load_documents): ditto. (syck_emitter_reset): ditto. * lib/yaml.rb (YAML.quick_emit): give the object itself to eimitter. don't use object_id and hash. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * {ext,lib,test}/**/*.rb: removed trailing spaces.nobu2009-03-061-18/+18
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix ruby -w warnings for mismatched indentation discovered by rdocdrbrain2008-09-231-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/yaml.rb (quick_emit): use combination of object_id and hash towhy2007-11-151-0/+4
| | | | | | | | identify repeated object references, since GC will reuse memory of objects during output of YAML. [ruby-Bugs-8548] [ruby-Bugs-3698] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_mod_define_method): should save safe_level in thematz2005-12-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | proc object. [ruby-dev:28146] * test/drb/drbtest.rb (DRbService::self.ext_service): increase timeout limit. a patch from Kazuhiro NISHIYAMA <zn at mbf.nifty.com>. [ruby-dev:28132] * eval.c (ev_const_get): fixed a bug in constant reference during instance_eval. [yarv-dev:707] * eval.c (ev_const_defined): ditto. * lib/yaml.rb (YAML::add_domain_type): typo fixed. a patch from Joel VanderWerf <vjoel at path.berkeley.edu>. [ruby-talk:165285] [ruby-core:6995] * ext/digest/sha2/sha2.c (ULL): support AIX C. a patch from Kailden <kailden at gmail.com>. [ruby-core:06984] * ext/syck/rubyext.c (rb_syck_compile): avoid potential memory leak. * ext/syck/rubyext.c (syck_set_ivars): avoid potential memory leak by explicit symbol allocation. * lib/delegate.rb (Delegator::method_missing): should delegate block as well. * lib/cgi.rb (CGI::QueryExtension::MorphingBody): fix criteria to use Tempfile. A fix from Zev Blut <rubyzbibd at ubit.com>. [ruby-core:06076] * string.c: remove global functions work on $_. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/yaml.rb: removed :nodoc: to generate Kernel doc. [ruby-core:6324]ocean2005-11-061-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * range.c (rb_range_beg_len): should return Qfalse for non-rangematz2005-10-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | object. * pack.c (EXTEND16): [ruby-dev:27383] * eval.c (set_trace_func): add rb_secure(4) to prevent adding tracing function. * lib/delegate.rb: document update from James Edward Gray II <james@grayproductions.net>. [ruby-core:05942] * process.c (proc_daemon): should restrict execution on levels higher than $SAFE=2. suggested by URABE Shyouhei <shyouhei@ice.uec.ac.jp>. * lib/forwardable.rb: replaced by new implementation from <Daniel.Berger@qwest.com>. [ruby-core:05899] * file.c (path_check_0): disallow sticky world writable directory in PATH (and $LOAD_PATH). [ruby-dev:27226] * numeric.c (fix_idiv): 1.div(1.0) should return integer value. [ruby-dev:27235] * lib/yaml.rb: require 'yaml/constants'. [ruby-core:5776] * lib/xmlrpc/client.rb (XMLRPC::Client::do_rpc): add charset information to content-type header.[ruby-core:5127] * lib/xmlrpc/server.rb (CGIServer::serve): ditto. * lib/xmlrpc/server.rb (ModRubyServer::serve): ditto. * lib/xmlrpc/server.rb (WEBrickServlet::service): ditto. * test/dbm/test_dbm.rb (TestDBM::test_s_open_error): remove test_s_open_error test to detect duplicate open. [ruby-dev:27202] * eval.c (splat_value): use to_a to splat non Array object. * object.c (nil_to_a): remove nil.to_a. [experimental] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/yaml.rb: reworking YAML::Stream to use the newwhy2005-09-131-49/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | emitter. * lib/yaml/stream.rb: ditto. * lib/yaml/rubytypes.rb: added Object#yaml_new. * lib/yaml/tag.rb: the tag_subclasses? method now shows up in the class. allow taguri to be set using an accessor. continue support of Object#to_yaml_type. * ext/syck/rubyext.c: new emitter code. yaml_new and yaml_initialize get called, should they be present. consolidated all the diaspora of internal node types into the family below YAML::Syck::Node -- Map, Seq, Scalar -- all of whom are SyckNode structs pointing to Ruby data. moved Object#yaml_new into the node_import and made it the default behavior. the target_class is always called wih yaml_new, prepended a parameter, which is the klass. loaded nodes through GenericResolver show their style. new Resolver#tagurize converts type ids to taguris. * ext/syck/implicit.re: were 'y' and 'n' seriously omitted?? * ext/syck/emitter.c: renovated emitter, walks the tree in advance. consolidated redundant block_styles struct into the scalar_style struct. (this means loaded nodes can now be sent back to emitter and preserve at least its very basic formatting.) * ext/syck/gram.c: headless documents of any kind allowed. * ext/syck/node.c: new syck_replace_str methods and syck_empty_* methods for rewriting node contents, while keeping the ID and other setup info. added syck_seq_assign. * ext/syck/syck.h: reflect block_styles and new node functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/yaml.rb: Kernel#y requires an argument.why2005-01-071-1/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/yaml.rb (YAML::load_file, YAML::parse_file): added.why2004-07-151-1/+39
| | | | | | | | | * ext/syck/token.c: re2c compiled with bit vectors now. * ext/syck/implicit.c: ditto. * ext/syck/bytecode.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/yaml.rb: added rdoc to beginning of lib.why2004-05-181-18/+58
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/yaml.rb: added rdoc to beginning of lib.why2004-05-181-8/+121
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/yaml.rb: removed fallback to pure Ruby parser.why2004-05-151-26/+9
| | | | | | | | | | | | | | | | | | | | | | | | * lib/yaml/baseemitter.rb (node_text): rewriting folded scalars. * ext/syck/syck.h: reports style of scalars now, be they plain, block single-, or double-quoted. * ext/syck/syck.c: ditto. * ext/syck/gram.c: ditto. * ext/syck/node.c: ditto. * ext/syck/token.c: ditto. * ext/syck/rubyext.c (yaml_org_handler): symbols loaded only if scalar style is plain. * test/yaml/test_yaml.rb (test_perl_regexp): updated test to match new regexp serialization. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/yaml/rubytypes.rb (to_yaml): added instance variable handlingwhy2004-05-061-7/+7
| | | | | | | | | | | | | | | for Ranges, Strings, Structs, Regexps. * lib/yaml/rubytypes.rb (to_yaml_fold): new method for setting a String's flow style. * lib/yaml.rb (YAML::object_maker): now uses Object.allocate. * ext/syck/gram.c: fixed transfer methods on structs, broke it last commit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dln.c, io.c, pack.c, lib/benchmark.rb, lib/cgi.rb, lib/csv.rb,nobu2004-04-181-1/+1
| | | | | | | | | | | | | | lib/date.rb, lib/ftools.rb, lib/getoptlong.rb, lib/logger.rb, lib/matrix.rb, lib/monitor.rb, lib/set.rb, lib/thwait.rb, lib/timeout.rb, lib/yaml.rb, lib/drb/drb.rb, lib/irb/workspace.rb, lib/net/ftp.rb, lib/net/http.rb, lib/net/imap.rb, lib/net/pop.rb, lib/net/telnet.rb, lib/racc/parser.rb, lib/rinda/rinda.rb, lib/rinda/tuplespace.rb, lib/shell/command-processor.rb, lib/soap/rpc/soaplet.rb, lib/test/unit/testcase.rb, lib/test/unit/testsuite.rb: typo fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/syck/lib/gram.c: allow root-level inline collections.why2004-04-021-2/+18
| | | | | | | | | | [ruby-talk:94922] * lib/yaml/rubytypes.rb (Symbol#to_yaml): emit symbols as implicits. [ruby-talk:94930] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Move "y" documentation to correct placedave2004-03-241-15/+16
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/yaml.rb (YAML::YAML): adjust Marshal version.nobu2003-12-201-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/syck/emitter.c: new emitter code.why2003-07-111-1/+36
| | | | | | | | | | | | | | | | | * ext/syck/rubyext.c: Emitter class. * lib/yaml.rb: Load Syck emitter, if available. * lib/yaml/stream.rb: ditto. * lib/yaml/baseemitter.rb: underlying class for all emitters. * lib/yaml/rubytypes.rb: use BaseEmitter abstraction. * lib/yaml/emitter.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/syck/rubyext.c (rb_syck_load_handler): merge key implemented.why2003-06-181-0/+7
| | | | | | | | | | | | | | * ext/syck/rubyext.c (transfer_find_i): removed use of String#=~ in favor of Regexp#match. * lib/yaml.rb: YAML::try_implicit returns. * lib/yaml/rubytypes.rb: Regexps added for type matching. * lib/yaml/emitter.rb: fix String + nil error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/syck/rubyext.c (syck_parser_mark): was a bit heavy on the GC.why2003-06-051-0/+8
| | | | | | | * lib/yaml.rb (YAML::transfer): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/token.c: single- and double-quoted root-level fix.why2003-05-221-5/+12
| | | | | | | | | | * lib/yaml.rb (YAML::object_maker): can create object attributes (such as found in Exception class) * lib/yaml/rubytypes.rb: roundtripping of Exception and subclasses. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/syck/gram.c: sequence-in-map shortcut, transfer methods onwhy2003-05-141-1/+1
| | | | | | | | | | | sequence-in-sequence, memory leak in mapping merge. [0.28] * ext/syck/syck.c: memory leak in domain anchoring. [0.28] * lib/yaml/rubytypes.rb, lib/yaml/types.rb: eliminated 1.6.x code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e