aboutsummaryrefslogtreecommitdiffstats
path: root/eval.c
Commit message (Collapse)AuthorAgeFilesLines
* * range.c (range_each_func): terminates loop if generating valuematz2004-05-141-29/+12
| | | | | | | | | | | | | | | | is same to @end. [ruby-talk:100269] * string.c (rb_str_new4): should not reuse frozen shared string if the original is not an instance of String. [ruby-talk:100193] * time.c (time_mdump): preserve GMT bit in the marshal data. [ruby-talk:100213] * eval.c (is_defined): do not protect exception during receiver evaluation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (eval): warning during eval should not cause deadlock.matz2004-05-101-3/+6
| | | | | | | | | | [ruby-talk:98651] * eval.c (rb_eval): raise TypeError exception for superclass mismatch. [ruby-dev:39567] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (string_content): turn off NODE_NEWLINE flag to avoidmatz2004-05-071-5/+24
| | | | | | | | | | | | | | | | | | | | | | | unnecessary line trace for inlined expression. (ruby-bugs PR#1320) * numeric.c (flo_to_s): tweak output string based to preserve decimal point and to remove trailing zeros. [ruby-talk:97891] * string.c (rb_str_index_m): use unsigned comparison for T_FIXNUM search. [ruby-talk:97342] * hash.c (rb_hash_equal): returns true if two hashes have same set of key-value set. [ruby-talk:97559] * hash.c (rb_hash_eql): returns true if two hashes are equal and have same default values. * string.c (rb_str_equal): always returns true or false, never returns nil. [ruby-dev:23404] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_mod_define_method): allow binding methods to modules.nobu2004-04-211-1/+2
| | | | | | | [ruby-dev:23410] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c, enum.c, eval.c, file.c, io.c, numeric.c, object.c, prec.c,nobu2004-04-141-1/+1
| | | | | | | process.c, re.c, string.c: typos in RDoc comments. [ruby-core:02783] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (pack_pack): use NUM2INT() instead of num2i32().matz2004-04-071-12/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_get_path): get path string via "to_path" method ifmatz2004-04-071-6/+3
| | | | | | | | | | | | path object is not a string. [Ruby2] * gc.c (rb_gc_call_finalizer_at_exit): do not free threads in the exit finalizers. * io.c (rb_io_reopen): should use rb_io_check_io(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * error.c (Init_Exception): remove Exception#to_str. [Ruby2]matz2004-04-051-1/+1
| | | | | | | | | | | * eval.c (error_print): should no call "to_str" anymore use "message" method instead. * io.c (rb_f_open): Kernel#open() calls "to_open" if the first argument responds to it. [Ruby2] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (top_include): include in the wrapped load is done formatz2004-04-021-5/+3
| | | | | | | | | | | | the wrapper, not for a singleton class for wrapped main. [ruby-dev:23305] * bignum.c (rb_big_eq): use temporary double variable to save the result (internal float register may be bigger than 64 bits, for example, 80 bits on x86). [ruby-dev:23311] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (block_pass): should increment unique identifier of thematz2004-04-021-0/+1
| | | | | | | block. [ruby-talk:96363] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (Init_load): make $LOADED_FEATURES built-in. [ruby-dev:23299]aamine2004-04-021-0/+1
| | | | | | | | * ruby.c (ruby_prog_init): make $PROGRAM_NAME built-in. * lib/English.rb: remove $LOADED_FEATURES and $PROGRAM_NAME. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_eval): fix SEGV at retry in iterator's receiver.nobu2004-03-301-2/+1
| | | | | | | [ruby-dev:23227] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * exception message clean-up by Ian Macdonald <ian@caliban.org>.matz2004-03-291-10/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (rb_mod_cvar_get): new method Module#class_variable_get.matz2004-03-231-1/+0
| | | | | | | | | | * object.c (rb_mod_cvar_set): ditto (Module#class_variable_set). * eval.c (rb_thread_atfork): 1.9 warns no more for thread termination. [ruby-dev:23212] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_require_safe): preserve old ruby_errinfo.matz2004-03-201-4/+6
| | | | | | | | | | | | | [ruby-talk:95409] * eval.c (rb_f_raise): should not clear backtrace information if exception object already have one. * parse.y (assoc_list): allow {sym: val} style Hash. [Ruby2] this change is done by Nobuyoshi Nakada <nobu@ruby-lang.org>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * variable.c (rb_cvar_set): class variables become private to thematz2004-03-191-1/+1
| | | | | | | | | | | particular class/module. [Ruby2] * variable.c (rb_cvar_get): ditto. * io.c (rb_io_sync): need not to check writable. [ruby-core:02674] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (proc_eq): avoid false positive by using scope andmatz2004-03-181-3/+3
| | | | | | | | | | | dyna_vars. no longer use frame.uniq. * eval.c (proc_arity): arity is now defined as number of parameters that would not be ignored. i.e. Proc.new{}.arity returns zero. update test suites too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c: remove specialized version of rb_Array(). use simplematz2004-03-181-28/+0
| | | | | | | | | | | one defined in object.c. * object.c (Init_Object): remove Kernel#to_a. * enum.c (enum_zip): use "to_a" instead of "to_ary". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_yield_0): should not re-submit TAG_BREAK if thismatz2004-03-151-0/+3
| | | | | | | yield is not break destination. [ruby-dev:23197] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_thread_raise): err at unstarted thread. (PR#1302)nobu2004-03-141-0/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (return_jump): set return value to the returnmatz2004-03-101-57/+11
| | | | | | | | | | | | | | destination. separated from localjump_destination(). * eval.c (break_jump): break innermost loop (or thread or proc). * eval.c (rb_yield_0): set exit_value for block break. * eval.c (eval): Only print backtrace if generating the backtrace doesn't generate an exception. [ruby-core:02621] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * struct.c (rb_struct_s_def): Struct::new executes block withmatz2004-03-101-70/+174
| | | | | | | | | | generated struct class. [ruby-talk:02606] * io.c (rb_io_ungetc): raise IOError instead of calling rb_sys_fail(). [ruby-talk:23181] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (method_hash): new method. [ruby-talk:93968]matz2004-03-031-8/+69
| | | | | | | | | | | | | | | * eval.c (proc_eq): do not compare dyna_vars. * eval.c (proc_hash): new method. * eval.c (rb_yield_0): protect break/return from within orphan (or lambda) Proc object. * parse.y (yylex): should not allow symbol for invalid global variable (e.g. `:$-)`). [ruby-core:02518] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (proc_invoke): no orphan block check is needed when pcallmatz2004-02-271-17/+28
| | | | | | | | | is true. * eval.c (localjump_destination): update localjump condition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (localjump_destination): lambda should not interferematz2004-02-261-4/+10
| | | | | | | | | | return from the yielded block. * hash.c (delete_if_i): use st_delete_safe() (via rb_hash_delete()) instead of returning ST_DELETE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_eval): care that another thread replace NODE_DREGX_ONCEakr2004-02-161-0/+3
| | | | | | | to NODE_LIT. [ruby-dev:22920] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (method_proc): return bound Proc object. [ruby-dev:22854]nobu2004-02-101-7/+16
| | | | | | | | | | | | * eval.c (rb_mod_define_method): bind method body itself for Method object. * node.h (NODE_DMETHOD): deprecated. * object.c (rb_class_inherited_p): export. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (umethod_bind): perge unused check. [ruby-dev:22850]nobu2004-02-101-6/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (opt_rescue): use NODE_ERRINFO() instead ofmatz2004-01-221-0/+3
| | | | | | | | | | | NODE_GVAR("$!"), to avoid confusion from variable aliasing. [ruby-talk:90074] * version.c (Init_version): remove obsolete constants VERSION etc. [ruby-dev:22643] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (newline_node): do not use NODE_NEWLINE node anymore,matz2004-01-211-15/+7
| | | | | | | | | | | | | | | | use NEWLINE flag instead. * ext/socket/socket.c (sock_gethostbyname): returns host if ai_canonname is NULL. (ruby-bugs PR#1243) * parse.y (block_append): update nd_end for "real" head node. [ruby-list:39058] * marshal.c (w_class): should not dump singleton class. [ruby-dev:22631] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * variable.c (rb_set_class_path): do not set path ifmatz2004-01-191-2/+2
| | | | | | | | * lib/cgi.rb (CGI::QueryExtension): give extended string, not a delegater object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * error.c (NameError::message): internal use only.nobu2004-01-191-1/+2
| | | | | | | * eval.c (rb_method_missing): use hidden constant. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * error.c (NameError::Message): new class for lazy evaluation ofnobu2004-01-171-70/+5
| | | | | | | | | message to ensure replaced before marshalling. [ruby-dev:22604] * eval.c (rb_method_missing): use NameError::Message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (proc_eq): compare also arguments and environmentnobu2004-01-161-0/+1
| | | | | | | (including local variables). [ruby-dev:22590] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eavl.c (proc_eq): compare also arguments and environment.nobu2004-01-161-2/+4
| | | | | | | [ruby-dev:22590] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: install rdoc by default. if you do not want tomatz2004-01-101-6/+4
| | | | | | | | | | | | | | | | | | | | install rdoc, specify --disable-install-doc. * eval.c (eval): need to add message delimiter. [ruby-dev:22561] * defines.h (__NeXT__): Ensure that all standard S_IRUSR, S_IWGRP, S_IRWXO, etc. macros are defined since future code might require them (even though present code only requires a subset). * defines.h (__NeXT__): Bug fix: WORDS_BIGENDIAN was not being set correctly on Rhapsody when -arch compiler flag was used (via configure's --enable-fat-binary option). * ext/socket/socket.c (make_hostent): getaddrinfo(3) on BSD do not fill ai_canonname if serv is not supplied. (ruby-bugs PR#1243) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c, object.c, process.c, re.c: don't use C++ style comments.eban2004-01-081-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_mod_modfunc): should break if m has no super class.matz2004-01-071-0/+1
| | | | | | | [ruby-dev:22498] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dir.c: merge tuning from H.Yamamoto <ocean@m2.ccsnet.ne.jp>.matz2004-01-021-0/+3
| | | | | | | | | | | | [ruby-dev:22476] * io.c (argf_eof): ARGF.eof? should not have any side effect. [ruby-dev:22469] * io.c (argf_each_byte): should return self. [ruby-dev:22465] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Finish documenting internal stuff. See Changelog for other detailsdave2004-01-021-4/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add RDoc for kernel functions, and tidy updave2003-12-301-5/+29
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add RDoc for Kernel global functions, tidy array and errordave2003-12-291-3/+952
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* RDoc comments for Proc, Method, and UnboundMethoddave2003-12-281-0/+372
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Thread/ThradGroup RDocdave2003-12-281-0/+601
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: check if getcontext and setcontext are available.nobu2003-12-261-1/+1
| | | | | | | * eval.c: use presence of getcontext/setcontext. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (search_required): search actual file name once when nonobu2003-12-241-10/+9
| | | | | | | extension specified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: check for nanosleep, -lrt if required.matz2003-12-241-3/+10
| | | | | | | | | | | | | [ruby-core:02059] * eval.c (thread_timer): use select(2) if nanosleep(2) is not available. * eval.c: check __stub_getcontext for glibc on some platforms. [ruby-list:38984] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (catch_timer): do not call rb_thread_schedule() inside tomatz2003-12-241-21/+28
| | | | | | | | | | | | | | | | | | | avoid pthread_mutex_lock() deadlock. interrupts to system calls are detected by TRAP_END via EINTR error. * eval.c (thread_timer): do not post signal unless it is absolutely necessary. * rubysig.h (TRAP_END): add CHECK_INTS to switch thread. * regex.c (re_compile_pattern): check if nextp is smaller than pend. [ruby-dev:22372] * eval.c (umethod_bind): remove method overridden check. [ruby-dev:22366] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (read_all): do not return nil at the end of file.matz2003-12-231-2/+3
| | | | | | | | | | | | | | | | | | | | | | | [ruby-dev:22334] * io.c (argf_read): do not depend on nil at eof behavior of IO#read(). * eval.c (rb_thread_join): dup exception before re-raising it. * io.c (rb_io_eof): call clearerr() to prevent side effect. this patch is supplied by Masahiro Sakai <sakai@tom.sfc.keio.ac.jp>. [ruby-dev:22234] * pack.c (OFF16): get offset for big endian machines. * pack.c (pack_pack): use OFF16 instead of OFF16B. [ruby-dev:22344] * pack.c (pack_unpack): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_with_disable_interrupt): use ENABLE_INTS instead ofmatz2003-12-221-3/+7
| | | | | | | ALLOW_INTS which may switch context. [ruby-dev:22319] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e