summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-complex/src
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2019-05-23 19:54:45 +0900
committerGitHub <[email protected]>2019-05-23 19:54:45 +0900
commit43a26aa95862690fa8f1341fe947faa876739b17 (patch)
treeb291e8179877550f44703894900db36b30f3e27a /mrbgems/mruby-complex/src
parent5f4eb87735c8c084fdb6b98df1eed0663e18b9d2 (diff)
parent48903850e9041e74c526fef5e63857007d2cac38 (diff)
downloadmruby-43a26aa95862690fa8f1341fe947faa876739b17.tar.gz
mruby-43a26aa95862690fa8f1341fe947faa876739b17.zip
Merge pull request #4463 from shuujii/freeze-Rational-and-Complex-objects
Freeze `Rational` and `Complex` objects
Diffstat (limited to 'mrbgems/mruby-complex/src')
-rw-r--r--mrbgems/mruby-complex/src/complex.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mrbgems/mruby-complex/src/complex.c b/mrbgems/mruby-complex/src/complex.c
index c6fb7a829..1b030c317 100644
--- a/mrbgems/mruby-complex/src/complex.c
+++ b/mrbgems/mruby-complex/src/complex.c
@@ -24,6 +24,7 @@ complex_new(mrb_state *mrb, mrb_float real, mrb_float imaginary)
struct mrb_complex *p = complex_ptr(mrb, comp);
p->real = real;
p->imaginary = imaginary;
+ MRB_SET_FROZEN_FLAG(s);
return comp;
}