Skip to content

Commit

Permalink
* eval.c (rb_eval): NODE_EVSTR is no longer used.
Browse files Browse the repository at this point in the history
* eval.c (eval): not enforce to make assigned variables dynamic.

* parse.y (string): split rules to strings/xstring/regexp to allow
  arbitrary statements inside string interpolation.

* parse.y (here_document): splitted into three phases.

* parse.y (literall_append, literal_concat): added.
  append/concatinate string literals.

* sample/test.rb (valid_syntax): adjust line number for BEGIN.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Jun 24, 2002
1 parent 0e866a2 commit 33061b4
Show file tree
Hide file tree
Showing 8 changed files with 665 additions and 617 deletions.
16 changes: 16 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
Mon Jun 24 16:16:59 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>

* eval.c (rb_eval): NODE_EVSTR is no longer used.

* eval.c (eval): not enforce to make assigned variables dynamic.

* parse.y (string): split rules to strings/xstring/regexp to allow
arbitrary statements inside string interpolation.

* parse.y (here_document): splitted into three phases.

* parse.y (literall_append, literal_concat): added.
append/concatinate string literals.

* sample/test.rb (valid_syntax): adjust line number for BEGIN.

Sun Jun 23 00:19:10 2002 Tadayoshi Funaba <tadf@dotrb.org>

* lib/date.rb, lib/date/format.rb, sample/cal.rb, sample/goodfriday.rb:
Expand Down
18 changes: 1 addition & 17 deletions eval.c
Original file line number Diff line number Diff line change
Expand Up @@ -3068,29 +3068,14 @@ rb_eval(self, n)
NODE *list = node->nd_next;

str = rb_str_new3(node->nd_lit);
if (!ruby_dyna_vars) rb_dvar_push(0, 0);
while (list) {
if (list->nd_head) {
switch (nd_type(list->nd_head)) {
case NODE_STR:
str2 = list->nd_head->nd_lit;
break;
case NODE_EVSTR:
result = ruby_errinfo;
ruby_errinfo = Qnil;
ruby_sourceline = nd_line(node);
ruby_in_eval++;
list->nd_head = compile(list->nd_head->nd_lit,
ruby_sourcefile,
ruby_sourceline);
ruby_eval_tree = 0;
ruby_in_eval--;
if (ruby_nerrs > 0) {
compile_error("string expansion");
}
if (!NIL_P(result)) ruby_errinfo = result;
/* fall through */
default:
ruby_sourceline = nd_line(list->nd_head);
str2 = rb_obj_as_string(rb_eval(self, list->nd_head));
break;
}
Expand Down Expand Up @@ -5025,7 +5010,6 @@ eval(self, src, scope, file, line)
if (ruby_frame->prev) {
ruby_frame->iter = ruby_frame->prev->iter;
}
if (!ruby_dyna_vars) rb_dvar_push(0, 0);
}
if (file == 0) {
file = ruby_sourcefile;
Expand Down
2 changes: 1 addition & 1 deletion ext/dl/mkcallback.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def mkfunc(rettype, fnum, argc)

ret_code =
if( DLTYPE[rettype][:c2rb] )
" return #{DLTYPE[rettype][:rb2c][\"retval\"]};"
" return #{DLTYPE[rettype][:rb2c]['retval']};"
else
" /* no return value */"
end
Expand Down
2 changes: 1 addition & 1 deletion ext/tcltklib/sample/sample1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ def test_listbox(ip, parent)
# clipboard をクリア.
clipboard.e("clear")
# selection から文字列を読み込み clipboard に追加する.
clipboard.e("append {#{selection.e(\"get\")}}")}))
clipboard.e("append {#{selection.e('get')}}")}))
me1.e("add command -label {selection -> clipboard} -command",c)
cb.push(c = TclTkCallback.new(ip, proc{
# li1 をクリア.
Expand Down
6 changes: 3 additions & 3 deletions lib/mkmf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -506,11 +506,11 @@ def create_makefile(target, srcprefix = nil)
CXXFLAGS = $(CFLAGS)
#{
if /bccwin32/ =~ RUBY_PLATFORM
"DLDFLAGS = #$LDFLAGS -L" + '"$(topdir:/=\\)"' + "\n" +
"LDSHARED = #{CONFIG[\"LDSHARED\"]}\n"
"DLDFLAGS = #$LDFLAGS -L\"$(topdir:/=\\)\"\n" +
"LDSHARED = #{CONFIG['LDSHARED']}\n"
else
"DLDFLAGS = #{$DLDFLAGS} #{$LDFLAGS}\n" +
"LDSHARED = #{CONFIG[\"LDSHARED\"]} #{defflag}\n"
"LDSHARED = #{CONFIG['LDSHARED']} #{defflag}\n"
end
}
LIBPATH = #{libpath}
Expand Down
Loading

0 comments on commit 33061b4

Please sign in to comment.